how to create a BR to hide the record only if the login user is managed by  group member

ying zeng
Tera Contributor

I want to use BR in the hardware table to hide records except login user is  managed by  group members..

so login user can only see cmdb record of there managed ..

 

yingzeng_1-1676024552923.png

 

1 ACCEPTED SOLUTION

Shubham_Shinde
Giga Guru

Hello @ying zeng 

You can create a Query BR and use dynamic condition to restrict user access to Hardware records for which "Managed By Group" is one of user's group: (This BR will not execute for users having admin role as per the condition)

ShubhamShinde1_0-1676026818722.png

You can get sys_id/encoded query of dynamic condition to be used by filtering Hardware table with below conditions and then copying the query:

ShubhamShinde1_1-1676027005051.png

 



If my answer has helped with your question, please mark it as helpful and give it a thumbs up!

Regards,

Shubham

 




View solution in original post

3 REPLIES 3

Shubham_Shinde
Giga Guru

Hello @ying zeng 

You can create a Query BR and use dynamic condition to restrict user access to Hardware records for which "Managed By Group" is one of user's group: (This BR will not execute for users having admin role as per the condition)

ShubhamShinde1_0-1676026818722.png

You can get sys_id/encoded query of dynamic condition to be used by filtering Hardware table with below conditions and then copying the query:

ShubhamShinde1_1-1676027005051.png

 



If my answer has helped with your question, please mark it as helpful and give it a thumbs up!

Regards,

Shubham

 




4b0d3
Giga Guru
  • If it's a security reason.  Add an ACL with a condition that he managed_by_group needs to be a group the user is in.
  • if you want it to be removed from a link,  build the query that does similar.  But without a security block against it, a smart user can just nab the table from the URL and go to the list directly.
  • If it's in a related list, you can disable filtering and set a condition.   OR build a relationship with the query built in.
  • you can Create a BR Query and amend the query that's being called.  

BharathChintala
Mega Sage

@ying zeng 

Write before query BR

 

conditions empty and only query checked

 

check advanced and in script write below line

 

current.addEncodedQuery(‘managed_by_groupDYNAMICd6435e965f510100a9ad2572f2b47744’);

If my inputs have helped with your question, please mark my answer as accepted solution, and give a thumb up.
Bharath Chintala