Open Closed

role service for angular #4411

User avatar
0 created

Is there an Angular service for roles? Something like PermissionService. We have two domains, one for employees. And we want to block access for employee role to the other domain. so regardless of the permissions, employee role should not be able to login/ access the other domain.

If there is none, then I think this should be done on backend by adding a new permission mainly for one purpose e.g. website access? And use that permission on frontend to block access. or would it be a good practice to just logout the user if application-configuration currentUser.roles returns employee role only?

Let me know if you need any more details. I'm purely new to ABP so please be understanding on how I structured my question.

1 Answer(s)
  • User Avatar
    mahmut.gundogdu created
    Support Team

    Yes, there is a role service that name is IdentityRoleService in @abp/ng.identity.

    If the user can access the roles, the user can manage roles with IdentityRoleService.

Made with ❤️ on ABP v8.0.0 Updated on September 27, 2023, 12:25