Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Business rule to restrict the list view

Omkar Jori
Tera Expert

I am working on a business rule where a user should not drill down to list view records when he clicks on CMDB health scorecard reports in a dashboard.

My user is having Asset role. 

 

This is what I have written BR -

 

(function executeRule(current, previous /*null when async*/) {

    if (gs.hasRole("dashboard_user, asset")){

        gs.addErrorMessage("The records can't be viewed due to security constraints");

        _______________________

    }

})(current, previous);

 

Output:- This code only gives a popup message,  what I need to restrict a user from accessing the list.

OmkarJori_0-1685006012445.png

 

2 REPLIES 2

Manmohan K
Tera Sage

Hi @Omkar Jori ,

 

Consider creating a Read ACL on cmdb_health_result table to restrict Asset role to view the reports 

Hi @Manmohan K ,

I have tried creating Read ACL on cmdb_health_result table but it is not working, the user is able to  view the records. 
There are 2 more ACLs created for report_view on the same table with none and * configuration.