-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Additional Role Claims Functionality #465
Conversation
Thanks for your PR, I will check it. 👍 |
That's good input, however, we might add UI to that 👍 |
|
||
var added = await IdentityRepository.AddClaimToRolesAsync(roleIds, roleClaimType, roleClaimValue); | ||
|
||
await AuditEventLogger.LogEventAsync(new RoleClaimDeletedFromRolesEvent(roleClaimType, roleIds)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong event. Should be: RoleClaimAddedToRolesEvent
Task<TRoleClaimsDto> GetRoleClaimAsync(string roleId, int claimId); | ||
|
||
Task<int> DeleteRoleClaimsAsync(TRoleClaimsDto role); | ||
|
||
Task<IdentityResult> DeleteRoleAsync(TRoleDto role); | ||
|
||
Task<int> DeleteClaimForRolesAsync(List<string> roleIds, string roleClaimType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IList
{ | ||
var rolesQ = from r in DbContext.Set<TRole>() | ||
join rc in DbContext.Set<TRoleClaim>() on r.Id equals rc.RoleId | ||
where rc.ClaimType.Equals(roleClaimType) && roleIds.Contains(r.Id.ToString()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
roleIds.Contains(r.Id.ToString()) in EFCore3.1 is not translated.
try: roleIds.Contains(((string)(object)r.Id))
More info: dotnet/efcore#20604
Add the following functionality to Admin API
I believe this is a good introduction to having more functionality around Role Claims.