|
|
@ -95,19 +95,6 @@ namespace Squidex.Domain.Users |
|
|
SyncBoolean(SquidexClaimTypes.Consent, Consent); |
|
|
SyncBoolean(SquidexClaimTypes.Consent, Consent); |
|
|
SyncBoolean(SquidexClaimTypes.ConsentForEmails, ConsentForEmails); |
|
|
SyncBoolean(SquidexClaimTypes.ConsentForEmails, ConsentForEmails); |
|
|
|
|
|
|
|
|
if (CustomClaims != null) |
|
|
|
|
|
{ |
|
|
|
|
|
foreach (var group in CustomClaims.GroupBy(x => x.Type)) |
|
|
|
|
|
{ |
|
|
|
|
|
RemoveClaims(x => x.Type == group.Key); |
|
|
|
|
|
|
|
|
|
|
|
foreach (var claim in group) |
|
|
|
|
|
{ |
|
|
|
|
|
AddClaim(claim.Type, claim.Value); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (Permissions != null) |
|
|
if (Permissions != null) |
|
|
{ |
|
|
{ |
|
|
RemoveClaims(x => x.Type == SquidexClaimTypes.Permissions); |
|
|
RemoveClaims(x => x.Type == SquidexClaimTypes.Permissions); |
|
|
@ -128,6 +115,19 @@ namespace Squidex.Domain.Users |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (CustomClaims != null) |
|
|
|
|
|
{ |
|
|
|
|
|
foreach (var group in CustomClaims.GroupBy(x => x.Type)) |
|
|
|
|
|
{ |
|
|
|
|
|
RemoveClaims(x => x.Type == group.Key); |
|
|
|
|
|
|
|
|
|
|
|
foreach (var claim in group) |
|
|
|
|
|
{ |
|
|
|
|
|
AddClaim(claim.Type, claim.Value); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (claimsToRemove.Count > 0) |
|
|
if (claimsToRemove.Count > 0) |
|
|
{ |
|
|
{ |
|
|
var result = await userManager.RemoveClaimsAsync(user, claimsToRemove); |
|
|
var result = await userManager.RemoveClaimsAsync(user, claimsToRemove); |
|
|
|