how can I check requested_for user has itil role or not using script?

Goutham sai
Tera Expert

Please help

1 ACCEPTED SOLUTION
3 REPLIES 3

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi Satish,



If this is on client side then we can g_user API.



You can use g_user.hasRole('itil') for single role and for multiple role you can use g_user.hasRoles('itil','admin');


This is applicable if he is logged in.



If he is not logged in then you have to use script include and Client script to check roles.


in script include you can use.


gs.hasRole OR gs.hasRoles



or you can query below table and get role of user:


sys_user_has_role



Thank you,


Ashutosh Munot


Thank you...got my answer