Query business rule not working for requested item table

New user1212
Tera Contributor

Hi,
I'm trying to create a restriction so that a user with the sn_incident_read and sn_request_read roles can only see things assigned to the group they belong to.

The business rule for the incident works but not for the requested item. Do you know why?
The user only has two roles and yet sees all requests

Newuser1212_0-1738150180416.png

Newuser1212_1-1738150201129.png

 

 

4 REPLIES 4

Sandeep Rajput
Tera Patron
Tera Patron

@New user1212 There is no caller_id field on Requested Item (sc_req_item) table hence your BR is not working. Try replacing the line number 5 as follows.

 

 

current.addQuery('requested_for',u).addOrCondition('assignment_group',getMyGroups());

 

 

Please mark my response helpful and accepted solution if it addresses your question.

Hope this helps.

I try in a different way. Do you have an idea how to make it work so that it doesn't affect users who belong to other groups than the one indicated? Because now if a group includes e.g. 5 users, then everyone has restrictions...

Newuser1212_0-1738151641692.png

 

@New user1212 in your screenshot the filter applies to members of a specific group. If the users are not members of that group then the filtering will not apply. 

 

 

it's about when a user belongs to this group but also belongs to others to which he has more assigned roles