hpw to write acl script for cmdb table to write records as per userlocation
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 01:32 AM
Hi
Can anyone help me with scenario for:
user wanted to write records as per his location assets attached
example:
When user is of india location all the assets in cmdb table of india location needs to be in edit mode
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 02:12 AM
hi @raj765_32
(function() {
if(gs.hasRole('admin'))
{
return true;
}
var userLocation = gs.getUser().getRecord().location;
if(!userLocation || userLocation.name!='India')
{
return false;
}
var ciLocation = current.location;
if(!ciLocation || ciLocation.name='India')
{
return false;
}
reurn true;
})();
Kinds Regards,
Dushyant Siorhi