<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question this._knowledgeHelper.canRead(knowledgeGR) function not returning record as expected in ServiceNow AI Platform forum</title>
    <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/this-knowledgehelper-canread-knowledgegr-function-not-returning/m-p/1152131#M108520</link>
    <description>&lt;P&gt;In the Script Include KBKnowledge, I have copied and pasted the&amp;nbsp;canRead: function(knowledgeGR) function from KBKnowledgeSNC because it seemed to be the function where I was finding the problem.&lt;/P&gt;
&lt;P&gt;Indeed, when I commented out various parts of the function, the problem became clear.&lt;/P&gt;
&lt;P&gt;When I&amp;nbsp;did the below comment, the record showed up for the user I was testing with.&lt;/P&gt;
&lt;PRE class="language-markup"&gt;&lt;CODE&gt;if (/* this._knowledgeHelper.canRead(knowledgeGR) &amp;amp;&amp;amp; */
       (knowledgeGR.workflow_state == 'published' || 
	knowledgeGR.workflow_state == 'outdated'  || 
	this._knowledgeHelper.canReadUnpublished(knowledgeGR))) {
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The natural reaction is to say that the user doesn't have read access to the article; however, the article is in a knowledge base which is open to the public (i.e., the CanRead user criteria on the knowledge base is empty).&lt;/P&gt;
&lt;P&gt;I cannot seem to find the code behind _knowledgeHelper.canRead anywhere.&lt;/P&gt;
&lt;P&gt;Anyone have any suggestions on how I can further troubleshoot this?&lt;/P&gt;
&lt;P&gt;I will also note that I am viewing the record through the Knowledge Feedback table, if that makes a difference.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Mar 2018 19:03:23 GMT</pubDate>
    <dc:creator>Eric Viets</dc:creator>
    <dc:date>2018-03-29T19:03:23Z</dc:date>
    <item>
      <title>this._knowledgeHelper.canRead(knowledgeGR) function not returning record as expected</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/this-knowledgehelper-canread-knowledgegr-function-not-returning/m-p/1152131#M108520</link>
      <description>&lt;P&gt;In the Script Include KBKnowledge, I have copied and pasted the&amp;nbsp;canRead: function(knowledgeGR) function from KBKnowledgeSNC because it seemed to be the function where I was finding the problem.&lt;/P&gt;
&lt;P&gt;Indeed, when I commented out various parts of the function, the problem became clear.&lt;/P&gt;
&lt;P&gt;When I&amp;nbsp;did the below comment, the record showed up for the user I was testing with.&lt;/P&gt;
&lt;PRE class="language-markup"&gt;&lt;CODE&gt;if (/* this._knowledgeHelper.canRead(knowledgeGR) &amp;amp;&amp;amp; */
       (knowledgeGR.workflow_state == 'published' || 
	knowledgeGR.workflow_state == 'outdated'  || 
	this._knowledgeHelper.canReadUnpublished(knowledgeGR))) {
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The natural reaction is to say that the user doesn't have read access to the article; however, the article is in a knowledge base which is open to the public (i.e., the CanRead user criteria on the knowledge base is empty).&lt;/P&gt;
&lt;P&gt;I cannot seem to find the code behind _knowledgeHelper.canRead anywhere.&lt;/P&gt;
&lt;P&gt;Anyone have any suggestions on how I can further troubleshoot this?&lt;/P&gt;
&lt;P&gt;I will also note that I am viewing the record through the Knowledge Feedback table, if that makes a difference.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 19:03:23 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/this-knowledgehelper-canread-knowledgegr-function-not-returning/m-p/1152131#M108520</guid>
      <dc:creator>Eric Viets</dc:creator>
      <dc:date>2018-03-29T19:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: this._knowledgeHelper.canRead(knowledgeGR) function not returning record as expected</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/this-knowledgehelper-canread-knowledgegr-function-not-returning/m-p/1152132#M108521</link>
      <description>&lt;P&gt;Through class inheritance you will find&amp;nbsp;_knowledgehelper in&amp;nbsp;the KBCommonSNC script include.&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;KBCommonSNC.prototype = {
	
	VERSIONING_PLUGIN : 'com.snc.knowledge_advanced',
	initialize: function() {
		this._knowledgeHelper = new SNC.KnowledgeHelper();
	},
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't think we can see the code within canRead() since it's core code.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I assume it checks the user criteria at the article level but it may also check at the Knowledge Base level aswell.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Although this post contains info specifically about canContribute() it is helpful.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.servicenow.com/community/community?id=community_question&amp;amp;sys_id=8d660be1db1cdbc01dcaf3231f96196a" rel="nofollow"&gt;https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=8d660be1db1cdbc01dcaf3231f96196a&lt;BR /&gt;&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;"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."&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 06:01:19 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/this-knowledgehelper-canread-knowledgegr-function-not-returning/m-p/1152132#M108521</guid>
      <dc:creator>Hadyn</dc:creator>
      <dc:date>2018-04-09T06:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: this._knowledgeHelper.canRead(knowledgeGR) function not returning record as expected</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/this-knowledgehelper-canread-knowledgegr-function-not-returning/m-p/1152133#M108522</link>
      <description>&lt;P&gt;Correct, we cannot see the code.&lt;/P&gt;
&lt;P&gt;Seeing that canContribute references admin, owner, or manager is consistent with my findings (those three 'roles' can also view the appropriate feedback records); however, I do not believe it is accurately determining if the user has a matching user criteria record.&lt;/P&gt;
&lt;P&gt;I have submitted&amp;nbsp;INT3675324 in the HI Service Portal.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 14:57:44 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/this-knowledgehelper-canread-knowledgegr-function-not-returning/m-p/1152133#M108522</guid>
      <dc:creator>Eric Viets</dc:creator>
      <dc:date>2018-04-09T14:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: this._knowledgeHelper.canRead(knowledgeGR) function not returning record as expected</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/this-knowledgehelper-canread-knowledgegr-function-not-returning/m-p/1152134#M108523</link>
      <description>&lt;P&gt;Hi Eric,&lt;/P&gt;
&lt;P&gt;I also think it is not working for matching user criteria. What was the outcome from HI Portal?&lt;/P&gt;
&lt;P&gt;Could you please let me know?&lt;/P&gt;
&lt;P&gt;Thanks&amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Mithun K R&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 18:18:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/this-knowledgehelper-canread-knowledgegr-function-not-returning/m-p/1152134#M108523</guid>
      <dc:creator>mit2324</dc:creator>
      <dc:date>2020-04-23T18:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: this._knowledgeHelper.canRead(knowledgeGR) function not returning record as expected</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/this-knowledgehelper-canread-knowledgegr-function-not-returning/m-p/1152135#M108524</link>
      <description>&lt;P&gt;Hi &lt;SN-MENTION class="sn-mention" table="live_profile" sysid="7a111a25db981fc09c9ffb651f9619e9"&gt;@Eric Viets&lt;/SN-MENTION&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the solution proposed for this..as we are looking for similar issue. Help here!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Dec 2021 10:08:37 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/this-knowledgehelper-canread-knowledgegr-function-not-returning/m-p/1152135#M108524</guid>
      <dc:creator>nagadeepika</dc:creator>
      <dc:date>2021-12-13T10:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: this._knowledgeHelper.canRead(knowledgeGR) function not returning record as expected</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/this-knowledgehelper-canread-knowledgegr-function-not-returning/m-p/3064026#M199259</link>
      <description>&lt;P&gt;Was there a resolution here?&amp;nbsp; &amp;nbsp;I am testing this on three different instances, and on a Vancouver patch 9 instance, it is definitely broken.&amp;nbsp; If I apply a 'cannot Read' to the KB which is simply a single user, it completely overrides the 'can Read' and no one can read any articles.&amp;nbsp; If I remove the 'cannot Read' UC on the KB, then everyone can read the articles, regardless of any criteria on the article itself.&amp;nbsp; It completely ignores them.&amp;nbsp; This makes me want to override script that makes the SNC.KnowledgeHelper.canRead() call and manually script the checks for article and KB user criteria.&amp;nbsp; &amp;nbsp;This may be behaving better in the later versions, however I did test this in two Vancouver instances with patch 9:&amp;nbsp; the one with the KB Advanced plugin is failing.&amp;nbsp; The PDI without the ability to install the advanced plugin is working okay in that the SNC.KnowledgeHelper.canRead() is honoring the article user criteria, and regardless of the 'glide.knowman.apply_article_read_criteria' property.&amp;nbsp; In fact, it is set to false and the article user criteria is working.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 20:09:17 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/this-knowledgehelper-canread-knowledgegr-function-not-returning/m-p/3064026#M199259</guid>
      <dc:creator>michaelward</dc:creator>
      <dc:date>2024-10-03T20:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: this._knowledgeHelper.canRead(knowledgeGR) function not returning record as expected</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/this-knowledgehelper-canread-knowledgegr-function-not-returning/m-p/3064059#M199261</link>
      <description>&lt;P&gt;I don't recall finding a solution to this, but it has been years since I have been in the role to work on Knowledge Management and no longer have access to look into this anymore.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 20:48:23 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/this-knowledgehelper-canread-knowledgegr-function-not-returning/m-p/3064059#M199261</guid>
      <dc:creator>Eric Viets</dc:creator>
      <dc:date>2024-10-03T20:48:23Z</dc:date>
    </item>
  </channel>
</rss>

