Posted: 27 Oct 2015 17:43 EDT Last activity: 28 Oct 2015 19:26 EDT
I have a requirement where I need to access the 'Access Role' of a person - I am using this to determine if the person has the adequate privilege to execute an activity. Is it possible to find out at run time from the clipboard values what the Access Role of a user is.
I think what you are trying to achieve is to allow access to execute an activity based on a role they have i.e. that user's access group must contain a specific role. In my opinion, you should use out of the box security rules to handle this. Create a privilege and add that to your activity's security tab. That's the best practice.
If you still want to go custom route, add a precondition to your activity, when Role is in AccessGroup.pyUserRoles value list (You may have to write a function for this OR just do a loop if you don't know how to write a function) then continue, otherwise exit activity. Please note that this is not a best practice.