Open Closed

How to prevent assigning admin role to users other than admin #9278

geertveenstra created


I have some users that can create other users (and assign roles to them), but I want to prevent those users to assign the Admin role to others (or themselves). Is this possible ? If not, maybe some hints about how I would go about preventing that ?

Optimally the roles should have some hierarchy where a user with a specific role can only assign roles lower than their own role ?

Geert Veenstra

2 Answer(s)
  • 0
    maliming created
    Support Team


    I think you can restrict some conditions in the application service method of assigning roles.

  • 1
    alharethi created

    Make sure the Admin role is not the default role assigned to newly created users.