Urgent!! Need help on making Knowledge base only visible to a certain group members

Pavithra08
Tera Contributor

Hello Experts,

 

We have a requirement requirement to make a Knowledge Base only visible to Group A and Group B.

 

I have tried user criteria, with the below scripting

 

checkCondition();

function checkCondition() {
var userId = this.getParameter('userId');


obj = {};
var gr1 = new GlideRecord('sys_user_grmember');
gr1.addQuery('user', userId);
gr1.addEncodedQuery('group=SysID');
gr1.query();
if (gr1.group.name == true) {
return true;
}
return false;
}

 

Still no luck, also I found that there is a read ACL for 'kb_knowledge_base' and 'kb_knowledge' tables.

Does the ACL over writing here? 

Please help me with your valuable answers.

Thanks in Advance!

3 REPLIES 3

Community Alums
Not applicable

Hi @Pavithra08 ,

You can Create a User Criteria and use this on your Knowledge Base level in the "Available for " Section.

Create a User Criteria :

  1. Navigate to Knowledge > Administration > User Criteria.
  2. Click New.
  3. On the User Criteria form, fill in the fields.Note: here enter your Group name.
  4. Submit.

Now, You can assign user criteria to control read or contribute access:

  1. Navigate to Knowledge > Administration > Knowledge Bases.
  2. Click the link to knowledge base you manage.
  3. Add user criteria to the knowledge base.
    1. Depending on the user criteria you want to set, select one or more of the relevant related lists.
       
      Related list Description
      Can Read Users can read knowledge articles in the knowledge base.
      Cannot Read Users can't read knowledge articles in the knowledge base.
      Can Contribute Users can create, modify, and retire knowledge articles in a knowledge base. Contribute access to a knowledge base also provides read access to all articles in the knowledge base.
      Cannot Contribute Users can't create, modify, retire, or read knowledge articles in the knowledge base.
      Note: If the related lists aren't visible, configure the Knowledge form to display them. For more information, see Add a related list to a form.
    2. In the selected related list, add the required user criteria.
      • As a user with the admin role, to add a new user criteria record, click New, specify the required fields, and then click Submit.
      • As a user with the knowledge_manager, knowledge_admin, or admin role, to add an existing user criteria record, click Edit, move the required user criteria from the Collection column to the Knowledge column, and then click Save.
  4. On the Knowledge Base form, click Update.

 

Hi Sandeep,

Thank you for your quick response, I tried Can Read option prior and still it is available for other users.

I have rechecked and confirmed their roles.

Also I have tried clearing cache. 

 

Pavithra08
Tera Contributor

Hi All,

I have achieved it by modifying the ACL and adding that two groups in 'Can read' and 'Can contribute' under the Knowledge Base.