Skip to content

Nextcloud Oauth2/OpenID property mapping incorrect #21055

@warlockuk

Description

@warlockuk

Do you see an area that can be clarified or expanded, a technical inaccuracy, or a broken link?

In the property mapping (optional) example to add 'admin' for superusers, the line:

groups = [group.name for group in user.groups.all()]

doesn't get the user's groups - it's an empty list.

Link

https://integrations.goauthentik.io/chat-communication-collaboration/nextcloud/

Solution

Using request.user.ak_groups does seem to work.

groups = [group.name for group in request.user.ak_groups.all()]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageAdd this label to issues that need to be triaged

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions