I presume this is a pretty common problem but I can never decide the best way to do it.

Simple system. It has users, users can be a assigned a role. Roles are defined by the admin users.

The situation arises where an admin wants to delete a role from the system which is still in use. I don't want to delete the role and leave the users without role so I'm firing back a message saying

"role (x) cannot be deleted as it is still in use"

However this isn't very helpful as the admin then has to go figure out which users have this role and assign them a new role, then go back and delete it.

Does anybody have any better mechanisms for this kind of functionality?

  • Thanks for the solutions people. Going to go away and have a think, I will mark an answer later. Commented Dec 6, 2011 at 9:31

5 Answers 5


Some software and websites address this issue by proposing to reassign the whole set of users to an existing "Unassigned users" or another role that the user can choose. That's a good thing to do because you don't prevent the user to achieve his primary task i.e. "remove a role". You stay out of the people's way.

So to help him get further, I'd propose him to * reassign the users to a "Unassigned users" role ; * or to present him the list of users with checkboxes to start reassigning users to other existing roles or create new ones.

The second part can be tricky if the role you want to delete contains a lots of users.


Don't let the admin delete a role without assigning those users to another role … or creating a new one. And make it easy!

enter image description here

  • Add to that an option to "manage roles" and they could potentially edit the existing role into one they want to keep.
    – Taj Moore
    Commented Dec 6, 2011 at 0:48

Along with the description of the problem, give a list of the users which have the role, in the same format and with the same functions available as user lists are ordinarily presented.

Then the administrator can select any or all of the users and change their roles, or examine them to see why they have this role, or any other action you and I haven't thought of — the interface lets them do anything they would do with any other user list, and deletion-prerequisites is not a special case.


It's a similar problem to trying to delete a shared document in Google docs.

The best solution is probably to inform the user that there are accounts using this role. I would try and give some useful contextual information e.g. the number of accounts that will be affected and possibly even the names of the users currently using the role. That way they can decide whether to proceed or not.

The admin needs to know what role these users will then be assigned. Even better would be to allow them to pick via a drop down.


1st decide what is leading. Is deleting the role leading or is the role in use leading.

Depending on the situation you could show a list of users in that role and give the option to simply remove the role anyway. Depending on what roles mean you'll either have to tell the current users that the role is deleted or not.

So tell a bit more about what users are what you mean by roles and how they're implemented and who that admin user is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.