Add EncodedQuery to an ACL

SC17
Tera Contributor

Hi.

Instead of a Business Rule, how can I add an encoded query to an ACL?

Let's say, if the logged in user has a certain role, he can only access HR cases created in the past month.

Thank you.

4 REPLIES 4

Tony Chatfield1
Kilo Patron

Hi, ACL's return a true\false result and so your encoded query needs to be via a scripted glide-query against the records table, normally this would return true when if(yourQuery.next()) condition check IE if your glide-query returned a result. My personal preference is to use a script-include and call the function, so that code can be reused\utilized as refqual, ACL or QBR.

MrMuhammad
Giga Sage

Hi,

Encoded Query is not required in this case instead you can specify the role in the Roles embedded list in and in the condition try something like this created before current month and in the script section try answer = gs.hasRole('SPECIFY_ROLE_HERE');

Regards,

Muhammad

Regards,
Muhammad

SC17
Tera Contributor

I managed to add the filters on to the endpoints instead of doing any validation.

A filter may 'hide' the records from certain views but it may not be a secure solution and your users could potentially still see the records for reports or by navigating to tables directly IE task.list in the filter navigator.

As Muhammad mentioned above, using role based ACL's is also a good option.