mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-22 12:30:32 -06:00
Merge pull request #6618 from kobergj/MoreRoleAssignerFixing
Fix OIDC Role Assigning
This commit is contained in:
@@ -5,3 +5,4 @@ This makes no sense as the user is supposed to have only one and the update will
|
||||
We still log an error level log to make the admin aware of that.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/6605
|
||||
https://github.com/owncloud/ocis/pull/6618
|
||||
|
||||
@@ -93,7 +93,7 @@ func (ra oidcRoleAssigner) UpdateUserRoleAssignment(ctx context.Context, user *c
|
||||
}
|
||||
logger.Debug().Interface("assignedRoleIds", assignedRoles).Msg("Currently assigned roles")
|
||||
|
||||
if len(assignedRoles) == 0 || (assignedRoles[0] != roleIDFromClaim) {
|
||||
if len(assignedRoles) != 1 || (assignedRoles[0] != roleIDFromClaim) {
|
||||
logger.Debug().Interface("assignedRoleIds", assignedRoles).Interface("newRoleId", roleIDFromClaim).Msg("Updating role assignment for user")
|
||||
newctx, err := ra.prepareAdminContext()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user