Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

hide script on script include

sydneyespos
Tera Expert

Hi community, do you have insights on how to hide the script section in script include for a particular script include? Only certain role can view the script. 

1 ACCEPTED SOLUTION

GlideFather
Tera Patron

Hi @sydneyespos,

 

a script include without the script field is useless... why would you do that?

 

If you want to restrict the access, then you can apply custom ACL on [sys_script_include] table... with that only specific role or group of users will have access to that field.

 

EDIT: custom ACL or adjust existing ones

https://yourinstance.service-now.com/sys_security_acl_list.do?sysparm_query=nameSTARTSWITHsys_script_include

 

Or you can think of adding/removing snc_required_script_writer_permission role but it would have impact on all scripting, not just script include:

GlideFather_0-1771576014422.png

This role was introduced one or two releases back, so check if your instance have it.

_____
Answers generated by GlideFather. Check for accuracy.

View solution in original post

11 REPLIES 11

GlideFather
Tera Patron

Hi @sydneyespos,

 

a script include without the script field is useless... why would you do that?

 

If you want to restrict the access, then you can apply custom ACL on [sys_script_include] table... with that only specific role or group of users will have access to that field.

 

EDIT: custom ACL or adjust existing ones

https://yourinstance.service-now.com/sys_security_acl_list.do?sysparm_query=nameSTARTSWITHsys_script_include

 

Or you can think of adding/removing snc_required_script_writer_permission role but it would have impact on all scripting, not just script include:

GlideFather_0-1771576014422.png

This role was introduced one or two releases back, so check if your instance have it.

_____
Answers generated by GlideFather. Check for accuracy.

we need to hide the script for specific script include as it is confidential

@sydneyespos 

OK, then you will need a security admin to adjust these ACL accordingly:

 

https://yourinstance.service-now.com/sys_security_acl_list.do?sysparm_query=nameSTARTSWITHsys_script_include

 

Based on the exact permission - shall the people see the script includes but cannot edit them (debugging purposes) or not to see them at all?

 

Based on the answers to questions above, you might want to restrict the access on the table level (they cannot see it at all) or field level (script field would be read only or invissible for them)..

 

EDIT: and don't forget for the list view restriction if you will hide the field... 

_____
Answers generated by GlideFather. Check for accuracy.

Ankur Bawiskar
Tera Patron

@sydneyespos 

but why?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader