49
Views
5
Comments
Solved
User and GrantXXXRole
Question

Hi all, 

I am trying to create an user registration page in the web screen where can assign role as well with the GrantXXXRole Action. However, where may I view the database record for such assignment?

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

Hi Jason,

I'm not sure I fully understand your question. Do you want to know where the system stores the roles that you assign? In that case, there's the System Entity "Role" that stores the roles and "User_Role" that stores the combination of user and role. If you use groups, there's also "Group" and "Group_Role".

UserImage.jpg
JASON Lau

Kilian Hekhuis wrote:

Hi Jason,

I'm not sure I fully understand your question. Do you want to know where the system stores the roles that you assign? In that case, there's the System Entity "Role" that stores the roles and "User_Role" that stores the combination of user and role. If you use groups, there's also "Group" and "Group_Role".

Yes, that's exactly what I'm looking for. Thanks for it. The reason why I was not able to locate it is I did not import in from the "Manage Dependencies". 


2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Jason,

Glad I could be of help. Happy coding!

2020-02-28 09-46-54
Eduardo Jauch

Hi, just to add on top of Killian answer.

For checking roles using the data stored in the system database, it is always better to check against the user_effective_role entity. It has all roles assigned to a user, including the roles assigned indirectly through the inclusion of a user in a group. These roles are not present in the user_role entity.

Cheers

UserImage.jpg
JASON Lau

Eduardo Jauch wrote:

Hi, just to add on top of Killian answer.

For checking roles using the data stored in the system database, it is always better to check against the user_effective_role entity. It has all roles assigned to a user, including the roles assigned indirectly through the inclusion of a user in a group. These roles are not present in the user_role entity.

Cheers


Great, I will have a look on it. Thanks for it. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.