Enabling one role to assign another roles to users
We have users, which should be able to change the roles for another users, but they should not have the Superadmin rights. That is why, I need to enable, that the role Administrator can assign another roles to users.
In the view /user-management/user-permission/set can the role Administrator see only the check box Administrator. So I prepared and tested the following commit: https://github.com/AntoninSlejska/user-management/commit/8795b79314bba0a69d6a706aa7e4de689e7ce3b8
It works as expected. But may be there is a more elegant way, how to solve this problem. Thanks.
Hi, right now user can assign roles for another users if he have overall permission to assign roles plus have all other roles (he can assign only roles that he already have). But I'm thinking about mixing it with something like your solution.
It's really strange that user can assign only roles that he already have. If user have permission to assign roles, it should mean that this user can assign any role to any user (except superadmin). Also there should be parameter like $userCanAssignOnlyChildRoles to allow user to assign only child roles.