Skip to content
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

Why does Role save Name, Client and User save ID? #2925

Closed
344089386 opened this issue Feb 26, 2020 · 4 comments
Closed

Why does Role save Name, Client and User save ID? #2925

344089386 opened this issue Feb 26, 2020 · 4 comments

Comments

@344089386
Copy link
Contributor

344089386 commented Feb 26, 2020

Why does Role save Name, User save ID?
image
Role names can change at any time.

@maliming
Copy link
Member

#2599

@344089386
Copy link
Contributor Author

I get the idea, but I still think it's better to save the ID so you don't have to do anything else to change the name.
thanks.

@zhangzunke
Copy link

zhangzunke commented Jul 8, 2020

I think that the saving role is better than role name in AbpPermissionGrants, any suggestion? @maliming

@hikalkan
Copy link
Member

hikalkan commented Aug 8, 2020

Because identity claims saves the role names in the authentication ticket by default and we generally don't have access to the role ids on every request. We didn't wanted to query it or include to the auth ticket unnecessarily. role name usage is pretty standard. Even the Authorize attribute gets the role name as string parameter.

@hikalkan hikalkan reopened this Aug 8, 2020
@hikalkan hikalkan closed this as completed Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants