-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Update permissions when a role name is changed #2599
Update permissions when a role name is changed #2599
Conversation
Thank you @mperk :) We'll review this. |
hi @mperk |
...nManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RoleUpdateEventHandler.cs
Outdated
Show resolved
Hide resolved
var permissionGrantsInRole = await PermissionGrantRepository.GetListAsync("R", eventData.OldName).ConfigureAwait(false); | ||
foreach (var permissionGrant in permissionGrantsInRole) | ||
{ | ||
await PermissionManager.UpdateProviderKeyAsync(permissionGrant, eventData.IdentityRole.Name).ConfigureAwait(false); |
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.
I'm not sure that the IPermissionManager
should add the UpdateProviderKeyAsync
method.
Maybe it can use IPermissionGrantRepository
directly. so some changes below can be undone.
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.
ok. I can move in the repo.
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.
It seems that we have ignored the above discussion. : )
I am not sure. When the system is using, the role names may be confused after a while. after change: |
Thank you @mperk for your contribution. |
Resolve #215
When the role name is changed, the event handler update permissions