getUserRoles()
Returns the security roles of the currently logged user account.
Syntax
Copy
getUserRoles(): string
Result
Returns a comma-separated string including all the user's security roles.
Copy
"Release Manager,Developer,Registered Users,test,User Management,Observability,Product Factory,Banking Product Admin,Product Analytics Utility,ProductFactoryAPIs"
Examples
In this example:
- We retrieve the list of security roles using the getUserRoles() function.
- We split the list by commas to separate each role.
- For each security role, we log it in the browser's console.
Copy
getUserRoles().split(',').forEach(item => console.log(item));