Romeo Casimina 3 Posted April 18, 2019 Share Posted April 18, 2019 Hi, Just want to confirm whether there is a possibility of getting privileges of the currently logged in user This is addressing a requirement wherein some data fields inside a form needs to be editable only for specific set of user. So what I am planning to do is create a data field (flag) which I will send to the form and use that flag to control the editable property of the field. Now to set this flag, I need to get the privileges of the currently logged in user. I checked the documentation for the OrgModel avaialble on both Process Manager and Work Manager (https://docs.tibco.com/pub/amx-bpm/4.2.0/doc/html/bpmhelp/GUID-3B2B4C0D-...), it did not specify any method for getting privileges unless I am missing something. I am also thinking of calling the REST API (getUserPrivileges) but just thinking it might already be available via scripting. Link to comment Share on other sites More sharing options...
Phillip Watson Posted May 1, 2019 Share Posted May 1, 2019 Unfortunately, there is no scripting API to retrieve the user's privileges. You can, as you suggest, use the REST API getUserPrivileges but that requires that you know the user's GUID. Another REST API is getResource. https://docs.tibco.com/pub/amx-bpm/4.2.0/doc/html/bpmhelp/GUID-B35B52B6-... This returns all the details of the identified resource. The resource GUID in the query parameters is optional and, if not specified, returns the caller's own details. Note, this API returns the resource's details with respect to the identified org-model version. So, it will only return the Privilege held in the given org-model version. Link to comment Share on other sites More sharing options...
Ketaki Anilkumar Lolage Posted May 10, 2019 Share Posted May 10, 2019 This might not be optimal, but if you know which privilege you're looking for, you can retrieve resources with that privilege using the dot operator:https://docs.tibco.com/pub/amx-bpm/4.2.0/doc/html/bpmhelp/GUID-BFF502EA-2996-4434-ABDD-73CEC9EEB13E.htmlIf it returns something, we can conclude that the resource has that privilege. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now