1198
Views
9
Comments
Solved
Filter aggregate by Role

Hello everyone,

I have a problem that I can't solve. I have a Table Records, which has an Aggregate as Source.

This Table records now presents a list of existing and registered Users in the application. I intended that in this list only appeared the Users with a certain Role.

How can I filter this list by Role? What filter will I have to do in Aggregate?


I appreciate the help.

Thank you

2018-10-16 12-50-10
Cristiano Chamorra
Staff
Solution

Henrique Querido wrote:

Hello everyone,

I have a problem that I can't solve. I have a Table Records, which has an Aggregate as Source.

This Table records now presents a list of existing and registered Users in the application. I intended that in this list only appeared the Users with a certain Role.

How can I filter this list by Role? What filter will I have to do in Aggregate?


I appreciate the help.

Thank you

Hi Henrique,


You can use the User_Effective_Role entity on your aggregate.


Hope this help,

Cristiano Chamorra


UserImage.jpg
Vishesh Kapoor

Cristiano Chamorra wrote:

Henrique Querido wrote:

Hello everyone,

I have a problem that I can't solve. I have a Table Records, which has an Aggregate as Source.

This Table records now presents a list of existing and registered Users in the application. I intended that in this list only appeared the Users with a certain Role.

How can I filter this list by Role? What filter will I have to do in Aggregate?


I appreciate the help.

Thank you

Hi Henrique,


You can use the User_Effective_Role entity on your aggregate.


Hope this help,

Cristiano Chamorra


hii can you help me to solve this problem i am facing the same issue and cant solve by adding the filter condition you mentioned above


2019-09-30 07-35-56
Aurelio Junior

Hi Henrique,

Just to complement Cristiano's answer, after adding the User_Effective_Role entity to your aggregate, you can filter by the specific Roles you want by using something like this:

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

To complement previous answers.

Remember that users that have SuperUser role will have ALL roles.
This means that even if you filter by a specific role, those users, usually not "real" users from the application, will appear too.

One way to eliminate those users is to create a dummy role that is not used for anything and not assign to the application users and you use it to filter out the Super Users.

Cheers.

2021-06-26 17-42-52
Jeevan Sai Sabbavarapu

Hi Edurado ,

I'm exactly looking for this 

can you please tell me how to get rid of that Dummy role while filtering the users in the aggregate, please provide filter logic if possible.


Thanks in Advance,

Sai.

2023-09-04 14-05-07
Henrique Querido

It's done, I did it with your help! 

Thank you all

2023-08-25 08-57-29
Johan den Ouden

Just a question what is the difference between the User_Effective_Role and the User_Role entity?

2019-09-30 07-35-56
Aurelio Junior

User_Effective_Role is a view that lists all Roles assigned to a user, either directly or through user groups. User_Role contains the roles assigned to the user directly.

2023-08-25 08-57-29
Johan den Ouden

Thank you for the explanation!

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