The CreatorCon Call for Content is officially open! Get started here.

Create an ACL to allow visibility of “State” field only to “ABC Group”. (Hint: Read ACL)

shivkumar1
Tera Contributor

Create an ACL to allow visibility of “State” field only to “ABC group”. (Hint: Read ACL).

2 ACCEPTED SOLUTIONS

Community Alums
Not applicable

Hi @shivkumar1 ,

You can implement a Read ACl on Incident table at the field level with the below script as:

1)ACL Type :- Read Acl

2)Condition :- Table Name. Field Name

3)Role:- if any role is mandatory

4)Code snippet

if(gs.getUser().isMemberOf('ABC_group')) {

  answer = true;

}

else{

answer = false;

}

 

View solution in original post

Hardik2109
Tera Guru

Hi @shivkumar1 

1) Go to Elevate role, give yourself a Security Admin role.

2) Navigate to Access Control from Application Navigator.
3) Click on "New" to create a new ACL.
4) Select type as Record, Operation as write, Admin override as True or False as per requirement, Name as table for which you want to use this ACL, for example : Configuration item [cmdb_ci], select the next dropdown as your field "State" and provide description.
5) Check the Advanced box as true, and in the script section write the code below:

if(gs.getUser().isMemberOf('ABC group')) {
answer = true;
}
else{
answer = false;
}

5) Click on Submit and test if it works as per requirements. 

Please mark my response as Correct based on Impact. Thanks!

View solution in original post

2 REPLIES 2

Community Alums
Not applicable

Hi @shivkumar1 ,

You can implement a Read ACl on Incident table at the field level with the below script as:

1)ACL Type :- Read Acl

2)Condition :- Table Name. Field Name

3)Role:- if any role is mandatory

4)Code snippet

if(gs.getUser().isMemberOf('ABC_group')) {

  answer = true;

}

else{

answer = false;

}

 

Hardik2109
Tera Guru

Hi @shivkumar1 

1) Go to Elevate role, give yourself a Security Admin role.

2) Navigate to Access Control from Application Navigator.
3) Click on "New" to create a new ACL.
4) Select type as Record, Operation as write, Admin override as True or False as per requirement, Name as table for which you want to use this ACL, for example : Configuration item [cmdb_ci], select the next dropdown as your field "State" and provide description.
5) Check the Advanced box as true, and in the script section write the code below:

if(gs.getUser().isMemberOf('ABC group')) {
answer = true;
}
else{
answer = false;
}

5) Click on Submit and test if it works as per requirements. 

Please mark my response as Correct based on Impact. Thanks!