Hi,
I have a requirement to extend user registration. Users will be required to select a Profile Type when registering. Profile Type is an entity that links to a set of Roles. The user will be be granted a default set of roles depending on their profile type. For example, the "Student" profile type will grant users the roles configured for that profile type. Tenant Admin can maintain which roles are granted to each profile type.
Basically, I need this to work the same way roles work for organizational units.
What is the easiest way that I can extend the ABP role / authorization provider to include the roles from profile type? Is there anything else I need to do for authorization / permission checks?
Thanks
2 Answer(s)
-
1
Hi @Siyeza,
You can override this method https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.ZeroCore/Authorization/Users/AbpUserStore.cs#L709 and return roles according to user's profile.
-
0
Thank you