I was wondering if it is possible to get the attribute information for a group based off of a users name. Currently I use this script
User user
Group group
UserClass uClass
for user in userList do
{
string uName = user.name
uClass = user.class
print uName " -- " stringOf(uClass) "\n"
for group in groupList do
{
string gName = group.name
bool b = member(group, user)
if (b)
{
print " Is a member of: " gName "\n"
}
}
}
which gives me the users name and then lists every group they are in. Now I need to go one step further and see what permissions have been set for each group. I.E. John Smith
allowing me to see if they are missing a permission or if they have permissions that they aren't meant to have.
MrNiceGuy - Mon Feb 13 20:00:28 EST 2017 |
Re: Attributes for User groups Side note: Does anyone know the link to the giant list of undocumented DXL commands? Not the excel sheet but there was a link to an HTML page with a giant list of undocumented DXL commands. I unfortunately cant seem to find the link that I thought I saved for it. |
Re: Attributes for User groups MrNiceGuy - Mon Feb 13 20:02:03 EST 2017 Side note: Does anyone know the link to the giant list of undocumented DXL commands? Not the excel sheet but there was a link to an HTML page with a giant list of undocumented DXL commands. I unfortunately cant seem to find the link that I thought I saved for it. Permissions for what? You can do two things - you can iterate over the access record of a DOORS artifact (Module, Object, Attribute, etc). Each artifact can have its own access records. You can iterate using the for (AccessRec& in ...) loop for this. The problem with permissions is, that the effective permission is pretty complex: - You can inherit permissions - You can propagate permissions (inherit, but childs have more permissions than parent) - User permissions override group permissions override "Everyone" permissions Making a logic to determine the effective permissions is not easy. If a user runs a DXL script the script can always check with "canRead", "canModify" ... etc. if the user has permissions to do the scripts task. If you are planning to verify the access on the artifacts, you should have a plan how the access records should be set (Group A - RMCD, Group B RM). I would not go as far and try to programmatically verify that the access records will give a certain user a certain permission.
Regarding the giant list of undocumented DXL commands - there are two kinds of undocumented commands: a) The perms list (excel sheet) b) The list of commands available in the DOORS internal DXL library ( probeAttr_, etc.) Are you looking for list b) ?
Maybe that helps. Regards, Mathias |
Re: Attributes for User groups Mathias Mamsch - Tue Feb 14 04:11:08 EST 2017 Permissions for what? You can do two things - you can iterate over the access record of a DOORS artifact (Module, Object, Attribute, etc). Each artifact can have its own access records. You can iterate using the for (AccessRec& in ...) loop for this. The problem with permissions is, that the effective permission is pretty complex: - You can inherit permissions - You can propagate permissions (inherit, but childs have more permissions than parent) - User permissions override group permissions override "Everyone" permissions Making a logic to determine the effective permissions is not easy. If a user runs a DXL script the script can always check with "canRead", "canModify" ... etc. if the user has permissions to do the scripts task. If you are planning to verify the access on the artifacts, you should have a plan how the access records should be set (Group A - RMCD, Group B RM). I would not go as far and try to programmatically verify that the access records will give a certain user a certain permission.
Regarding the giant list of undocumented DXL commands - there are two kinds of undocumented commands: a) The perms list (excel sheet) b) The list of commands available in the DOORS internal DXL library ( probeAttr_, etc.) Are you looking for list b) ?
Maybe that helps. Regards, Mathias Yes I am looking for list B |