this._knowledgeHelper.canRead(knowledgeGR) function not returning record as expected

Eric Viets
Mega Expert

In the Script Include KBKnowledge, I have copied and pasted the canRead: function(knowledgeGR) function from KBKnowledgeSNC because it seemed to be the function where I was finding the problem.

Indeed, when I commented out various parts of the function, the problem became clear.

When I did the below comment, the record showed up for the user I was testing with.

if (/* this._knowledgeHelper.canRead(knowledgeGR) && */
       (knowledgeGR.workflow_state == 'published' || 
	knowledgeGR.workflow_state == 'outdated'  || 
	this._knowledgeHelper.canReadUnpublished(knowledgeGR))) {

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).

I cannot seem to find the code behind _knowledgeHelper.canRead anywhere.

Anyone have any suggestions on how I can further troubleshoot this?

I will also note that I am viewing the record through the Knowledge Feedback table, if that makes a difference.

6 REPLIES 6

michaelward
Tera Guru

Was there a resolution here?   I am testing this on three different instances, and on a Vancouver patch 9 instance, it is definitely broken.  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.  If I remove the 'cannot Read' UC on the KB, then everyone can read the articles, regardless of any criteria on the article itself.  It completely ignores them.  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.   This may be behaving better in the later versions, however I did test this in two Vancouver instances with patch 9:  the one with the KB Advanced plugin is failing.  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.  In fact, it is set to false and the article user criteria is working.

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.