Business rule to restrict the list view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2023 02:14 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2023 04:52 AM
Hi @Omkar Jori ,
Consider creating a Read ACL on cmdb_health_result table to restrict Asset role to view the reports
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2023 12:33 AM
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.