- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago - last edited 2 weeks ago
Viewing an article says - 'You do not have sufficient privileges to access this knowledge item'
Scenario and Reason for this issue in our case:
End users had bookmarked few articles. When the users opened those links it says
Reason - Those articles are actually retired!
Issue - It gives wrong impression to the users right? They are creating incidents and Service requests saying - give me the privileges/role to view those articles.
But in reality, they are retired and nothing to with privileges or roles.
Why such a message by ServiceNow OOTB?
Question - How/where can I change this message?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
You might need to update the 'Knowledge Article Content' widget code to make your expected changes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hi Suggy,
I have a similar requirement. Can you please let me know what changes did you do? Is it working ? I tried something but the knowledgeRecord is giving me null value every time for retired article on portal.
Thanks,
Harsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday - last edited Wednesday
Hi @Harsha34
Use the following code in the else part at line no 198:
if(!kbViewModel.canAccessRetiredArticle(kbViewModel.knowledgeRecord)){
data.messages.INSUFFICIENT_PREVILEGES = gs.getMessage("This article is retired");
}else {
data.messages.INSUFFICIENT_PREVILEGES = gs.getMessage("You do not have sufficient privileges to access this knowledge item");
data.messages.RECORD_NOT_FOUND = gs.getMessage("Knowledge record not found");
}
Screenshot for reference:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hi Nehal,
This is wonderful, it worked for retired articles but this message is also overriding another message i.e. "You do not have privileges", do you have an idea why is this happening?
Ideally if the person has can read access to that article they can view it but if they are not in it the message "You do..." should come , now the message is coming but the issue got exchanged
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hi @Suggy ,
We have ran into similar issue, can you please assist us what changes we must do ?
Thanks,
Akash Srivastav.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
@AkashS531332023 its answered by @Nehal Dhuri and I have already marked it as correct solution.
Are you looking for something else?