Hello, I know we can set an UserGroup AccessRights with the method SetAccessRights.
But can i do the same from a Group? I noticed the method does not exist for groups.
I am trying to do a script that changes the AccessRights of a usergroup to a specific group.
The reason for this is because i am pretty much "cloning" the access rights from a Old DB to a New DB, using an excel where i only have the old GUIDs of usergroups and the new GUIDS of the new usergroups.
When I run the script I always need to choose a Main Group from a DB.
I do try to use inherit to change the access rights of the groups but in the end I am just changing the Main.
Please tell me if there an easier way to change AccessRights of Groups.
M. Zschuckelt on
Hello Ana,
have you considered the method
inheritAccessRights ( )
of the Group object? It propagates all access rights from the group to its sub-groups. Note that this is different from what you do in the client, when you select a specific user's (or user group's) permission and inherit that to the sub-groups.
Do I understand correctly that the target DB is a copy (backup&restore) of the source DB in a different environment (with different user and user group GUIDs)? What you can be sure of in that case is, that the GUIDs of the groups in the source and target DBs are identical (including the main group). So if you have a mapping of the source and target GUIDs of the users and user groups, it should be possible to create a list of all groups and their user permissions (method AccessRights) and use that to create the same permissions in the target environment for the mapped user and user group GUIDs.
Using a permission inheritance scheme always bears the risk of overlooking/overwriting deviating permissions downwards in the group hierarchy.
Regards, M. Zschuckelt