How to give read access to itil users & write access to specific group users on Custom created table

shaik_irfan
Tera Guru

Hello,

 

I created a custom table for which i need to read access to all the itil users and write access to Network Support group users.

 

How to acheive this ?

1 ACCEPTED SOLUTION

Prins Kumar Gup
Giga Guru

Hi Irfan,

Write the code in ACL script part:-

For Write Access:-

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

For Read Access:-

if(gs.getUser().hasRole('itil')){
answer = true;
}
else
{
answer = false;
}

 

TIA

PKG

View solution in original post

6 REPLIES 6

Cayley
ServiceNow Employee
ServiceNow Employee

Hi Shaik,

 

You will need to create 2 ACL rules, one for each group's level of access.

have a look at the docs on how to do this:

https://docs.servicenow.com/bundle/london-platform-administration/page/administer/contextual-securit...

 

(note you will need to elevate your roles to security_admin before you an create or edit ACLS)

 

rule #1,

Type: record

Operation: Read

Name: (this is where you choose your custom table) , leave second dropdown as none to apply rules to the entire table.

Add the Role 'itil' to the requires role related table

 

 

rule #2,

Type: record

Operation: Write

Name: (this is where you choose your custom table) , leave second dropdown as none to apply rules to the entire table.

 

-> create a new role for managing your custom table, ie. 'XXXX support'

Add the new Role'XXXX support' to the requires role related table AND to the Network support group to give them write access

 

🙂

 

Thank you that may work but we dont want to create a custom role 😞

vinothkumar
Tera Guru
Create a read and write ACL on your custom table by checking advanced as true answer =(gs.getUser().isMemberOf('TEST_GROUP') || gs.hasRole(itil);

Prins Kumar Gup
Giga Guru

Hi Irfan,

Write the code in ACL script part:-

For Write Access:-

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

For Read Access:-

if(gs.getUser().hasRole('itil')){
answer = true;
}
else
{
answer = false;
}

 

TIA

PKG