ACLs should not have GlideRecord/GlideAggregate in script

Renu9
Tera Contributor

ACLs (Security rules) should not have GlideRecord/GlideAggregate in script

We have an ACL written on sys_attachment table and the script is Checking if current user is a member of any human resources group. Gliderecord to 'sys_user_grmember' is used.

Please suggest any alternative other than Gliderecord/GlideAggregate for checking.

 

12 REPLIES 12

@Renu 

Hope you are doing good.

Did my reply answer your question?

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Renu 

Hope you are doing good.

Did my reply answer your question?

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Shivani Singh1
Tera Guru

Hello Renu,

You can achieve this requirement by using below code

**Assuming Group Name = HR Support

answer = gs.getUser().isMemberOf("HR Support");

Please mark helpful and accept the solution if it solves the purpose.