SNC.KnowledgeHelper.canContribute

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2015 03:48 AM
Hi,
Where i can find the code defined for knowledgeHelper.canContribute?
I searched for all the script includes , but does not find the exact one .
Thanks,
Naveen
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2015 04:58 AM
The meaning of canContribute() seems the user who can at least manage to contribute one of the knowledge base, but where this code is defined?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2015 07:28 AM
Partially this means that a user has at least "knowledge" role
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2015 06:48 AM
I THINK the code just checks against whatever data you've defined here: Managing Knowledge - ServiceNow Wiki
And the object they use to do so is locked down so it can't be modified.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2015 09:06 AM
The other answers pretty much have it covered. It is not implemented in a Script Include, this is core application code that is exposed to scripting via an interface. canContribute will return true if the user is admin, is the owner or manager of that KB, or if that user has a matching user criteria. The wiki article says that if there are no user criteria any ESS user can contribute but the code seems to contradict that.