438 views

Description

The new knowledge base that is created by the Human Resources Service Management plugin is not honoring the user criteria, while other V3 knowledge bases do.

Steps to Reproduce

  1. Ensure that the Knowledge Management V3 plugin is activated (including demo data).
  2. Activate the Human Resources Service Management plugin (including demo data).
  3. Import the attached xml (this is user criteria that gives permission only to a specific user).
  4. Go to Knowledge > Administration > Knowledge Bases.
  5. For both IT and Human Resources Knowledge knowledge bases, go to the KB homepage.
  6. Edit the Can Read and Can Contribute related lists, by adding the User BL user criteria.
  7. Impersonate the user.
  8. Go to kb_knowledge.list.
  9. Group by Knowledge Base column (add it to the list if needed).
    You can see articles from both knowledge bases (IT and Human Resources Knowledge) as expected.
  10. Impersonate a different user (User B).
  11. Go to kb_knowledge.list.
  12. Group by Knowledge Base column (add it to the list if needed).
    You cannot see articles from the IT knowledge base (as expected), but you can still see articles from the Human Resources Knowledge knowledge base (unexpected).

Because the user criteria includes only the user BL and it is attached to both knowledge bases, the User B should not be able to have access to any of them, but still has access though the Human Resources Knowledge knowledge base.

Workaround

As a workaround, you can use a different knowledge base that is created manually.

If you need to move articles form one knowledge base to another, run the following script in Scripts - Backgrounds:

var TARGET_KB_SYS_ID = '7f4ff8eddf403100b5157a0d3df2631e'; //The sys_id of the knowledge base where we want to move the KB articles to
var TARGET_KB_CATEGORY = 'ed1c2552ff0131009b20ffffffffff65'; //The sys_id of the category inside the new knowledge base, where the KB article should be moved to

//An array of articles that we want to move to the above category in the HR knowledge base
var KB_ARTICLES_TO_MOVE = [
"KBXXXXXXXXX","KBYYYYYYYYY","KBZZZZZZZZZ"];

for (var i = 0; i < KB_ARTICLES_TO_MOVE.length; i++) {
moveKBArticle(KB_ARTICLES_TO_MOVE[i]);
}
function moveKBArticle(kbNumber) {

var kb = new GlideRecord('kb_knowledge');
kb.setWorkflow(false);
kb.addQuery('number',kbNumber);
kb.query();
if (kb.next()) {
kb.kb_knowledge_base = TARGET_KB_SYS_ID;
kb.kb_category = TARGET_KB_CATEGORY;
kb.update();
gs.print('Updated ' + kbNumber);
} else {
gs.print('Did not find ' + kbNumber);
}
}

Note that the script is designed to move articles from the base system Human Resources Knowledge knowledge base to a specific category. You will have to run this script for each category.


Related Problem: PRB646998

Seen In

Fuji Patch 3

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2016-04-19 06:35:11
Published:2015-09-26