ACL to restrict "write" to a group

lakshmidurga
Tera Expert

Hi All,

I am trying to write an ACL,which defines the incidents should be editable only to a particular group.I wrote the below ACL but it is not working.

Please correct me if I have done something wrong

function inc(grp,prio)

{

var usr = gs.getUserID();

var grp = usr.isMemberOf();

if(grp =='77a8880adbc932002c98d540cf9619c0')

  {

  return true;

  }

  else

  {

  return false;

  }

}

Thanks in advance.

8 REPLIES 8

anurag92
Kilo Sage

Better than this, just code as:



  1. if(gs.getUser().isMemberOf('77a8880adbc932002c98d540cf9619c0'))
  2. return true;


Let me know if this helps


Mihir Mohanta
Kilo Sage

You can write your script like:


//In place of sys_id you can use group name also.



if(gs.getUser().isMemberOf('77a8880adbc932002c98d540cf9619c0')) {


  answer = true;


}


else{


answer = false;


}



Thanks,


Mihir


Hi Anurag,Mihir



Thanks for your response


I tried with both the cases,still it is not working.


Can you share the script that you have used now ?



Thanks,


Mihir