Base solution for your next web application
Open Closed

Angular 6: How to get currentUsers role #7020


User avatar
0
larsfk created

Hi!

What is the best way to get the users role in Angular 6? Or to see if a user is "admin" or not.

Thanks :)

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

1 Answer(s)
  • User Avatar
    1
    ryancyq created
    Support Team

    Hi, you can first get admin role via RoleAppService and use the roleId for admin role in the next call to UserAppService

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)