mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-16 20:47:58 -04:00
change assign roles logic
Signed-off-by: jkoberg <jkoberg@owncloud.com>
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