core icon indicating copy to clipboard operation
core copied to clipboard

Group Admin: Should be able to delete from group, not from system

Open MTRichards opened this issue 13 years ago • 36 comments

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.

MTRichards avatar Jan 17 '13 14:01 MTRichards

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.

jancborchardt avatar Feb 28 '13 20:02 jancborchardt

cc @raghunayyar for more use cases of User Management.

jancborchardt avatar Aug 06 '13 21:08 jancborchardt

@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?

jancborchardt avatar Apr 17 '14 09:04 jancborchardt

Yep - can it be iterated after user management is updated?

MTRichards avatar Apr 17 '14 13:04 MTRichards

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.

jancborchardt avatar Apr 17 '14 14:04 jancborchardt

I think I mentioned all my concerns in #8244, but I'm happy to answer any questions that may come up.

tessus avatar Apr 18 '14 13:04 tessus

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 avatar Apr 18 '14 16:04 tessus

@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!

jancborchardt avatar Apr 24 '14 15:04 jancborchardt

Any update here?

enoch85 avatar Aug 16 '14 13:08 enoch85

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.

tessus avatar Aug 16 '14 19:08 tessus

@karlitschek @craigpg @MTRichards requesting for triage.

jancborchardt avatar Aug 18 '14 15:08 jancborchardt

Additional description can also be found at #6746

MorrisJobke avatar Aug 20 '14 13:08 MorrisJobke

@jnfrmarks Can you test this please? Just making sure it has been fixed...

MTRichards avatar Sep 17 '14 19:09 MTRichards

@MTRichards

Should a sub admin have the right to create and delete users from the system? Right now they do.

jnfrmarks avatar Sep 17 '14 21:09 jnfrmarks

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 avatar Sep 17 '14 22:09 MTRichards

@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?

jnfrmarks avatar Sep 18 '14 18:09 jnfrmarks

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 avatar Sep 18 '14 19:09 MTRichards

@MTRichards: I don't see that in the current UI

jnfrmarks avatar Sep 18 '14 19:09 jnfrmarks

Because this is a feature request. It does not yet exist ;-)

LukasReschke avatar Sep 18 '14 19:09 LukasReschke

Clearly I was missing that point :)

jnfrmarks avatar Sep 18 '14 19:09 jnfrmarks