nextcloud / nextcloud/server

[Bug]: Group memberships are missing when a sub-admin edits a user

Open
#61,090 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 34-feedback bug
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

A sub-admin editing a user who belongs to a group they administer cannot remove the user from that group because the user's current group memberships are not displayed in the edit dialog.

But user admin can see the user's group memberships and manage them as expected.

This appears to have been introduced by #59406.

Steps to reproduce
  1. Log in as admin.
  2. Create two groups (e.g. grp1 and grp2).
  3. Create a user (e.g. demo) and add the user (demo) as both a member and admin of the two groups.
  4. Log in as demo.
  5. Create another user (e.g. user1) and add them as a member of the both groups.
  6. Open the edit dialog for user1.
  7. Check the member of the following groups section.
Image
Expected behavior

The user's current group memberships are displayed, and the sub-admin can remove the user from groups they manage (also related to https://github.com/nextcloud/server/issues/61013).

Nextcloud Server version

34

Operating system

Debian/Ubuntu

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

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 reproducing the issue through the user-management edit dialog with a sub-admin, then trace the code handling the dialog's group-membership data and compare it with the admin path. Review the related issues #59406 and #61013. Done means managed groups are shown for the sub-admin and can be removed as expected, with the existing reproduction steps passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
authorization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.