User can't access to Knowledge Article but in Service Portal he see the pdf of other Articles.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2023 02:23 AM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2023 04:21 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2023 04:27 AM
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!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2023 06:00 AM
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.
}