- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2022 07:54 PM
Hi All,
I need a help reagrding ACL script on knowledge article form to restrict the users editing/deleting the article except the author and owner group. Except these users the other users should not be able to edit or delete the article. Please suggest the script.
Regards,
Tejaswini RG
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2022 12:08 AM
Hi Ashwini,
You can use the below script
if (gs.getUser() = current.author || gs.getUser.isMemberOf(current.ownership_group) = tue){
answer = true;
}
else
{
answer = false;
}
Correct the syntax errors and field names if required
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2022 12:08 AM
Hi Ashwini,
You can use the below script
if (gs.getUser() = current.author || gs.getUser.isMemberOf(current.ownership_group) = tue){
answer = true;
}
else
{
answer = false;
}
Correct the syntax errors and field names if required
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2022 03:39 AM
Hi Vishnu,
I tried the script in ACL, and i have deactivated the OOB ACL. Buts still i am not able to edit the article if i am not part of owner group or author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2022 07:00 AM
Hi Ashwini,
That's what the requirement was, right ? And the ACL script is fulfilling that. If you want everyone to update the article, then there is no need to use this script, just write an ACL with the required role

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2022 03:45 AM
Hi Ashwini.
This is an OOB functionality, if you have enabled glide.knowman.ownership_group.enabled property as true. Only Ownership group would have the access to do modifications.
I would recommend to go through the documentation of ownership group before doing any customization to the instance.
Link to documentation - https://docs.servicenow.com/bundle/quebec-servicenow-platform/page/product/knowledge-management/concept/enable-ownership-group.html
Hope this helps.
Regards,
Deepankar Mathur