235
Views
4
Comments
Solved
Aggregate / SQL: list of users in a Role
Question

Hi all !

I need to find a query to retrieve the list of the users of a particular "Role".

Actually I'm selecting all the users and I cycle all the items with the "CheckXYZRule" ... but I would like to find a better way to do that ...

Thanks !

2018-12-09 19-13-19
Tiago Gomes
Solution

Hello, you should use the User_Effective_Role because if you're assigning roles by group you can catch them also. For the filters you can use the role like this:

Hope it helps,

Cheers!

2018-06-05 16-54-03
Maria da Graça Peixoto

Hi! 

you can use the User_Role entity from System module. 

Regards

Graça

2019-11-26 09-13-57
Luca De Mori

Hi Maria, thanks for your answer !

I added the "Users_Role" in my sources (now I have the User and the User_Role) ... but what about the "Filters" page ?

The roles I want to check are 118 and 119 (showed in my "OSSYS_ROLE" table) ...

2018-12-09 19-13-19
Tiago Gomes
Solution

Hello, you should use the User_Effective_Role because if you're assigning roles by group you can catch them also. For the filters you can use the role like this:

Hope it helps,

Cheers!

2019-11-26 09-13-57
Luca De Mori

Hi Tiago ... thanks for your reply !

It works perfectly !

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