How to define system property for ACL

Mr khan
Tera Contributor

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! 

3 REPLIES 3

AshishKM
Kilo Patron
Kilo Patron

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

Mr khan
Tera Contributor

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?

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