How to define system property for ACL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 10:58 AM - edited 04-22-2024 11:01 AM
We need a property to identify which roles and which group can delete the relationships.This should be used in the ACL.
Assist me to how can I achieve this, In advance, Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 11:54 AM
Hi @Mr khan ,
You can create a the role list in System Properties [ sys_properties ] table, and you can use this system propery in ACL script using the below code line.
gs.getProperty("<Name of System Property>"); // replace the property name
-Thanks,
AshishKM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 12:06 PM - edited 04-22-2024 12:07 PM
Hi Ashish,
Thanks for the reply 🙂
Bit confused , create role under properties means I have to add the role value into that property correct?
Adding the role value means just we are giving permission these role user can see or edit the property right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 12:32 PM - edited 04-22-2024 12:33 PM
yes, add the role name in system property.
in the acl script code you need to retrieve the property value and check against the current logged in user. If its matched then return answer = true else false as below.
var allowRole = gs.getProperty("systemPropertyName);
answer = gs.hasRole(allowRole );
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution