fixed iam with exclusive roles (in some cases?) being broken
This commit is contained in:
parent
5d4e730f35
commit
6841c3969a
1 changed files with 6 additions and 2 deletions
|
@ -280,7 +280,11 @@ public sealed class SarAssignerService : IEService, IReadyExecutor
|
||||||
|
|
||||||
if (item.Group.IsExclusive)
|
if (item.Group.IsExclusive)
|
||||||
{
|
{
|
||||||
var rolesToRemove = item.Group.Roles.Select(x => x.RoleId);
|
var rolesToRemove = item.Group.Roles
|
||||||
|
.Where(x => item.User.RoleIds.Contains(x.RoleId))
|
||||||
|
.Select(x => x.RoleId)
|
||||||
|
.ToArray();
|
||||||
|
if (rolesToRemove.Length > 0)
|
||||||
await item.User.RemoveRolesAsync(rolesToRemove);
|
await item.User.RemoveRolesAsync(rolesToRemove);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue