User and GrantXXXRole

User and GrantXXXRole

  

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?

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".

Solution

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". 


Hi Jason,

Glad I could be of help. Happy coding!

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

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.