Hello, I am writing a script that needs to do the following: 1) Select a group and see which projects they have access to, along with what level of access 2) Select a user and see which projects they have access to, along with what level of access I started out with the code below. But, I am getting errors with hasPermission function because I am passing it a group name and not a user name. Is there an undocumented function to look up access for groups to accomplish the above? Please assist. Thanks in advance, ~ Hanna
Project P
for g in groupList do
print groupName "\n"
}
hyaldo - Thu Oct 02 17:06:39 EDT 2014 |
Re: Get permissions for groups and List projects they belong to I see that "hasPermission" asks whether the current user has certain permissions; (except for the Signature perms). For groups: if that Group has a specific AccessRecord to the Project then use that. If the group has no AccessRecord to the project then use the default "Everyone else" access record. For Users: First you get a list of all your Groups and then a list of each Group's users.=; then parse that to derive the list of groups for each user. You cannot directly get a list of Groups for each user. For access to a Project:
You will need this:
Following is a function perhaps you can use to do the accumulateing.
Here is a function to turn a "Permission" into a string, e.g. "RMCD"
-Louie |
Re: Get permissions for groups and List projects they belong to The attached prints out, in CSV format, all the projects in the database and their access permissions. Copy the output and save to a *.csv file using notepad or something, then open in Excel.
Hope that helps
Attachments printProjAccess2.dxl |
Re: Get permissions for groups and List projects they belong to Tony_Goodman - Thu Oct 16 09:44:30 EDT 2014 The attached prints out, in CSV format, all the projects in the database and their access permissions. Copy the output and save to a *.csv file using notepad or something, then open in Excel.
Hope that helps
Thanks for the replies!!! This is very close to what I need. I can filter the CSV file by groups and get what I need that way instead of building a GUI. The one addition I need is that I 's like to get another column that parses users for each group from the groups column and include that in the excel as a seperate column so I can filter on individual users as well and see which projects thry have access to. How can I modify the attached DXL to include another column of users? Thanks in advance!!! ~ Hanna
|