34
Views
5
Comments
Solved
Roles
Question

Hi Guys!


I have following situation:

In my system I need to check a user's role, but it is not a logged in user, I have registered the name and an identification, in this case this identification is a key created in an internal bank. I will be entering a page where I will look for the name of this key and later bring up the Role profile of that user.


Would anyone know of a solution?

2023-10-21 19-42-11
Tousif Khan
Champion
Solution

Hello,

I assume if you are trying to identify the user by key, and later on checking the roles, the easy way is why don't you just fetch the user id of a user from user table from the username or email what so ever is unique in your  case, and then pass that user id to user role table that you will find in system module, this will help you check whether user has any role assigned or not, more over you can just simply pass the user id to check role action and see whether the user has particular  role or not.

Thanks

Tousif Khan

2024-05-08 06-29-37
Prince Aadil Khan Panwar

Hi fabiano Pinto,

For that I would like to suggest you to create a sub entity for the user. The user has logged in or not. 

For example 

User_log_in_details

User_id

HasLogin Boolean by default false.

Follow this- 

1.When you register a user, perform the creation task for User_log_in_details entity with user identifier.

2. When this user login in then update this record as true for has login.

3. As per situation, you can create one screen for admin who will be responsible for the assigning the roles. 

4. List should be who has s not logged in the system by applying join with user and user_log_in_details which user has HasLogin =false. But for only for register person is not a good approach who will assign the roles.

5.  Now keep a dropdown for roles which role the admin wants to assign for each record of user.

Hope this helps.

Thanks

Prince



UserImage.jpg
Fabiano Ferreira

Thank you!

2023-10-21 19-42-11
Tousif Khan
Champion
Solution

Hello,

I assume if you are trying to identify the user by key, and later on checking the roles, the easy way is why don't you just fetch the user id of a user from user table from the username or email what so ever is unique in your  case, and then pass that user id to user role table that you will find in system module, this will help you check whether user has any role assigned or not, more over you can just simply pass the user id to check role action and see whether the user has particular  role or not.

Thanks

Tousif Khan

2023-11-22 10-51-50
Jozy Sohail

Hi fabiano,

Just join the three tables as shown below and apply the filter of userName

this will give you all the details of any user that you want(including the roles), if you know their userName.

Hope it helps,

Thanks

2024-11-05 11-28-22
Sunil Rajput

Hii

    I you can asine the manager role user table i am already share oml logic user page and user details and resolve this issue check OML

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