How to write a script for create ACL
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2022 10:19 AM
Hi All,
My requirement is Write an ACL on the "short description" field on incident table so that it is editable only to admins and user who have this email (shareeshareef223@gmail.com). so for this i need a script. And one more thing is don't want to use the roles.
so can anyone help me to archive this.
regards,
Shareef
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2022 10:35 AM - edited 11-03-2022 10:36 AM
I'll start off by saying, I hope this isn't for production because this sounds like a horrible idea.
Here's a script that should work
var answer = false;
var loggedInUserEmail = gs.getUser().getEmail();
var emailMatch = 'shareeshareef223@gmail.com';
if (emailMatch == loggedInUserEmail) {
answer = true;
} else {
answer = false;
}