Skip to content

feat: allow an alias for the admin group - #1573

Open
zeedif wants to merge 1 commit into
nextcloud:mainfrom
zeedif:feat/admin-group-alias
Open

zeedif wants to merge 1 commit into
nextcloud:mainfrom
zeedif:feat/admin-group-alias

Conversation

@zeedif

@zeedif zeedif commented Oct 11, 2026

Copy link
Copy Markdown

I use an SSO where all my admins live in an Admins group, but Nextcloud only treats members of the built-in admin group as admins, so group provisioning can't map them.

This adds a groupAdminAlias provider setting (--group-admin-alias in occ user_oidc:provider, plus a field below the group whitelist regex). When the groups claim contains that group, the user is also synced into admin, and removed from it once the group disappears from the claim. admin skips getId(), so it stays the real admin group with unique or provider-based IDs. An empty alias keeps the current behaviour.

Tested on Nextcloud 35.0.1: with --group-admin-alias=Admins, a user provisioned with ["Admins", "users"] ends up in admin (isAdmin() is true) and loses it on the next sync with ["users"]. Unit test added.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

🤖 Generated with Claude Code

Nextcloud only grants admin rights through the built-in admin group, so a provider whose admins live in a group like "Admins" cannot map them. The new groupAdminAlias setting adds the admin group to the synced groups when the alias is in the groups claim.

Signed-off-by: Zeedif <zeedif@hotmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant