Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2019-05-24 11:13 AM
Hello Folks,
Is there any way to get current user (logged in ) roles through custom object?
for example , the current user is jaskirat and this user has system administrator, Dr: admin etc etc i want all the roles .
thanks.
2019-05-24 04:45 PM
I've moved your question to the RSA Archer Customer/Partner Community" data-type="space space where it will be seen by the product's support engineers, other customers and partners. Please bookmark this page and use it when you have product-specific questions.
Alternatively, from the RSA Customer Support" data-type="space page, click on Ask A Question on the blue navigation bar and choose Ask A Product Related Question. From there, scroll to RSA Archer Suite" data-type="space and click Ask A Question. That way your question will appear in the correct space.
Regards,
Erica
2019-05-24 04:52 PM
Jaskirat, you can probably pass the user Id (via parent.parent.ArcherApp.globals.userId) to the REST APIs /api/core/system/role/user/*userid* and get the users roles back. The only caveat is that I'm not sure if users have the permissions to see all their assigned roles.
Advisory Consultant
2019-05-25 05:41 AM
Adding to David's excellent comment.
Here is a similar code which gets the groups associated with the logged in user. You can tweak the code by replacing the URL with the one which David has mentioned. You should get the roles associated with the user.