User can't access to Knowledge Article but in Service Portal he see the pdf of other Articles.

Delia Spica
Tera Contributor

Hello, 

I'm having an issue with a user that can see only the Knowledge Articles from Italy, but when he searches for an Article name in the search bar of the Service Portal (ex. "Baby Leave", see my attachment for reference), in the results there are all the attachments from all the Articles that contains the keyword that he searched for.

I was wondering if there's any way to hide the attachments of Knowledge Articles from Service Portal view for the users that don't have the rights to see the Articles, if I could do like an ACL or a Client Script.

Thanks in advance for you help!

 

3 REPLIES 3

Samaksh Wani
Giga Sage
Giga Sage

Hi Delia

 

In Search Sources of Service portal, Open the Knowledge Base Option

 

and  add the specific users to role in script to which you want them to make visible.

 

Regards,

Samaksh 

 

Hello Samaksh, thanks for your reply!
I actually opened the Search Sources as you recommended, but I can't understand where should I add the specific user to role in script. Can you please help me?
Thanks!!!

Samaksh Wani
Giga Sage
Giga Sage

var grUserRoles = new GlideRecord('sys_user_has_role');  

 

grUserRoles.addQuery('role', '282bf1fac6112285017366cb5f867469');     //Enter sys_id of Your role

 

grUserRoles.query();  

 

while(grUserRoles.next()) {

 

// search source code

 

// try this to fit in it.

 

}