How to write a script for create ACL

shareef1
Tera Contributor

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

Mike_R
Kilo Patron
Kilo Patron

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;
}