Skip to content
Snippets Groups Projects
Commit 59d17eaa authored by Arie Peterson's avatar Arie Peterson
Browse files

Add OIDC attributes for Nextcloud/oidc_login

parent bcfffe7c
No related branches found
No related tags found
1 merge request!148Resolve "Support prefixed user IDs for nextcloud"
Pipeline #42669 passed with stages
in 5 minutes and 53 seconds
......@@ -387,6 +387,16 @@ class KratosUser():
"preferred_username": username,
"email": self.email,
"stackspin_roles": roles,
# We use this in Nextcloud because the `oidc_login` app wants a
# boolean flag saying whether the user should have admin
# privileges.
"is_admin": "admin" in roles,
# This is also for Nextcloud specifically: we used to use the
# `social_login` app for OIDC, which prefixed all user IDs with
# `stackspin-`. We need to stay compatible with that naming scheme
# until we figure out if and how we want to migrate those prefixes
# away.
"stackspin_prefixed_uuid": "stackspin-" + self.uuid,
}
if app == "wekan":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment