mirror of
https://github.com/owncloud/ocis
synced 2026-04-26 17:55:24 +02:00
Extract role assignments from claims
Add a UserRoleAssigner implementation that extract role names from the users' claims and creates role assignments in the settings service based on a configured mapping of claim values to ocis role names. Closes: #5669
This commit is contained in:
committed by
Ralf Haferkamp
parent
d57d52b33d
commit
a448c75c75
@@ -52,7 +52,20 @@ func DefaultConfig() *config.Config {
|
||||
},
|
||||
},
|
||||
PolicySelector: nil,
|
||||
Reva: shared.DefaultRevaConfig(),
|
||||
RoleAssignment: config.RoleAssignment{
|
||||
Driver: "default",
|
||||
// this default is only relevant when Driver is set to "oidc"
|
||||
OIDCRoleMapper: config.OIDCRoleMapper{
|
||||
RoleClaim: "roles",
|
||||
RoleMapping: map[string]string{
|
||||
"admin": "ocisAdmin",
|
||||
"spaceadmin": "ocisSpaceAdmin",
|
||||
"user": "ocisUser",
|
||||
"guest": "ocisGuest",
|
||||
},
|
||||
},
|
||||
},
|
||||
Reva: shared.DefaultRevaConfig(),
|
||||
PreSignedURL: config.PreSignedURL{
|
||||
AllowedHTTPMethods: []string{"GET"},
|
||||
Enabled: true,
|
||||
|
||||
Reference in New Issue
Block a user