Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Any ways to get the current user roles though custom object?

jaskiratsingh
Contributor III

Hello Folks, 

Is there any way to get current user (logged in ) roles through custom object?

pastedImage_1.png

for example , the current user is jaskirat and this user has system administrator, Dr: admin etc etc i want all the roles .

 

thanks.

3 REPLIES 3

EricaChalfin
Archer Employee
Archer Employee

jaskirat singh‌,

 

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

DavidPetty
Archer Employee
Archer Employee

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

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.

https://community.rsa.com/message/933979#comment-934096