How to create an ACL for current.parent.owner of a Knowledge article
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2022 10:08 AM
Fairly new to the SN platform, so apologies for what I imagine is a straightforward question...
I am basically trying to create an ACL for the kb_cateogry Table for "create". I am trying to make it so only if the current user has the knowledge_admin role OR is current.parent.owner (current article Knowledge base owner). I was able to add "knowledge_admin" to the Requires Roles section but as for the current.parent.owner, I am somewhat at a loss. My guess is that I would need to write a script for this rather than using "Requires Role" ?
Any guidance would be greatly appreciated. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2022 10:13 AM
Hello Yes you would need a acl script. Please find below the script which you can use:-
var user=gs.getUserID();
var own=current.parent.owner
if(own==user ) {
return true;
}else{
return false;
}
Hope this helps. Please mark the answer as correct/helpful based on impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2022 11:23 AM