Group Admin: Should be able to delete from group, not from system
Today, a group admin can add new users within their group. That works well.
But, the user can delete ANY user in their group from the system completely. That should not be. There should be a configurable option set by the overall admin where the group admin can/cannot delete users from the system when deleting from the group. Also, a group admin should never be able to delete a user from the system that is a member of another group. These use cases should help explain:
Example 1: user 1, user 2 and user 3 are added by the overall admin. user 1 is the group admin of group 1. user 2 and 3 are also members of this group. user 3 is also a member of group 2. user 1 deletes user 3 from group 1, but user 3 should still be a member of group 2, and the group 1 admin should not be able to delete user 3 from the system, only from their group. This is regardless of any configurable options mentioned above.
Example 2: user 1, user 2 and user 3 are added by the overall admin, and made members of group 1. user 1 is the group admin of group 1. The admin does not grant user 1 the right to delete users from the system when deleted from the group. user 1 removes user 2 from the group with a delete. user 2 is still a member of the system, but is no longer a member of any group. The overall admin can then delete the user if necessary, or assign other groups.
Example 3: user 1, user 2 and user 3 are added by the overall admin, and members of group 1. user 1 is the admin of group 1. The overall admin GRANTS user 1 the right to delete users from the system when deleted from the group. user 1 deletes user 2 from group 1, and since he is not a member of any other group, user 2 is deleted from the system.
Example 4: user 1 is the group admin of group 1. User 1 adds a new user to the system as a member of group 1. At a later time, user 1 can delete the added user from the group and possibly from the system following the configuration switch in Examples 2 and 3.
Also, group admins should probably not be able to change the quota or password of users in their group. Or at least not if they are still in other groups.
cc @raghunayyar for more use cases of User Management.
@karlitschek @MTRichards we just had another duplicate of this issue – what’s the plan with this? Might be good to fix this with ownCloud 7?
Yep - can it be iterated after user management is updated?
Yup, the user management pull request should not have more features piled onto it ;) https://github.com/owncloud/core/pull/7151 And we really need to review it so we can get it merged in time.
I think I mentioned all my concerns in #8244, but I'm happy to answer any questions that may come up.
Maybe offtopic in this thread, but something you might be interested to hear. (It is slightly related though.)
I understand the concept of undo, but this concept is wrong for deleting users. Somebody could hit the mouse button twice and thus the data of the first user is gone w/o being able to undo the damage. You should give the admin (who set up the SW) the choice via a config parameter, if he wants confirmations. I don't mean 'are you sure', but something like 'enter the name of the user to delete the user and ALL (their/his/her) data'.
@tessus good proposal with the »Enter the name of the user to delete the user and ALL their data.« That’s how Github does it with repositories. That’s much better than undo and a simple yes/no confirmation in this case. Can you please open a separate issue for that? Thanks!
Any update here?
It doesn't seem so. IMO this bug should have a very high priority, since this misbehavior can destroy data forever. Unfortunately it was classified as enhancement, which probably means it was queued rather at the end of the list.
But I really think that this is rather a bug, because a group admin can delete users and data outside his group.
@karlitschek @craigpg @MTRichards requesting for triage.
Additional description can also be found at #6746
@jnfrmarks Can you test this please? Just making sure it has been fixed...
@MTRichards
Should a sub admin have the right to create and delete users from the system? Right now they do.
Ok, so the bug still exists.
As per the above, admins get to decide whether group admins can delete from the system, or just from their groups.
@MTRichards How does an admin decide that? In other words, is there supposed to an option on the UI granting the subadmin user the right to delete users from the system?
The request was for a place where the admin can make such a check mark. In theory, once a user is a group admin, the admin can also decide if the group admin can delete from the system or that a delete is just from their group.
@MTRichards: I don't see that in the current UI
Because this is a feature request. It does not yet exist ;-)
Clearly I was missing that point :)