nextcloud / nextcloud/server

Config option to disallow group admins from fully deleting users

Open
#44,293 4 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement feature: users and groups
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Multiple times we have encountered situations, where group admins have decided to delete users, that weren't meant to be deleted. Either caused by miscommunication or too little knowledge.
Sometimes group members were supposed to leave the group and were also using the account privately, not just for the group, and a full deletion was not in their interest.

The docs about group admins don't even mention user deletion capabilities: https://docs.nextcloud.com/server/28/admin_manual/configuration_user/user_configuration.html#:~:text=to%20any%20groups.-,Group%20Admin,-Group%20admins%20are

Edit 2024-05-10
It is mentioned once: https://docs.nextcloud.com/server/28/admin_manual/configuration_user/user_configuration.html#granting-administrator-privileges-to-a-user

Describe the solution you'd like
An option to disable user deletion privileges and permissions from group admins.

Describe alternatives you've considered

  1. Completely remove user deletion privileges and permissions from group admins, without a configuration option.
  2. Allow group admins to only disable users.
  3. Add a general retention period for deleted users of a configurable timeframe. Each "deleted" user would stay in an inactive state for 30 days, before the final deletion. Allowing admins to reverse the action as soon as somebody reads the notifications emails or unsuccessfully tries to access data from the account.
    Maybe the account could be automatically reactivated, if the users logs in again.

Additional context
The process of restoring user data, not just files but app data, manually by tinkering with the database, is super complicated and should always be avoided.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the group-admin permissions described in the issue and the linked administrator documentation on user configuration. Compare the proposed alternatives, then trace where group admins can delete users. Done means the selected behavior is configurable and prevents unintended full deletion while preserving the intended administrative operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authorization, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.