Skip to content

fix(teams): hide member actions the user is not allowed to perform - #5796

Merged
hamza221 merged 1 commit into
mainfrom
fix/circles/2808
Oct 23, 2026
Merged

hamza221 merged 1 commit into
mainfrom
fix/circles/2808

Conversation

@kyteinsky

@kyteinsky kyteinsky commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

The member menu showed options that the server rejected:

  • With "Members can also invite" enabled, plain members saw "Remove member", but only moderators and above can remove members.
  • Moderators saw "Promote to Admin", but only admins can change promote members to admin.
  • Current user check compared the wrong ID which did not show the "Leave team" button but showed a "Remove member" option which failed before.

The changes have been ported from https://github.com/nextcloud/circles/pull/2659/changes#diff-9d7019613f51c3295ed2655f2ad6d8474e0b4e0da1a9d2e4f3afb5f4b686646c

Assisted-by: Github Copilot:claude-opus-5-5

fixes: nextcloud/circles#2808

now the page shows a "Leave Team" button only beside the user currently logged in:

image

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

@nextcloud-command nextcloud-command added the AI assisted This PR contains AI-assisted commits label Oct 22, 2026
@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

The member menu showed options that the server rejects:

- With "Members can also invite" enabled, plain members saw
  "Remove member", but only moderators and above can remove members.
- Moderators saw "Promote to Admin", but only admins can change
  promote members to admin.
- Current user check compared the wrong ID which did not show the "Leave
  Team" button but showed a "Remove member" option which failed before.

Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
Assisted-by: Github Copilot:claude-opus-5-5

@cristianscheid cristianscheid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@hamza221

Copy link
Copy Markdown
Contributor

/backport to stable8.9

@hamza221
hamza221 merged commit 8783b99 into main Oct 23, 2026
44 checks passed
@hamza221
hamza221 deleted the fix/circles/2808 branch October 23, 2026 13:21
@welcome

welcome Bot commented Oct 23, 2026

Copy link
Copy Markdown

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/contacts/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assisted This PR contains AI-assisted commits

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Actions that cannot be performed are visible in the team members list

4 participants