How to make a message appear on a catalogue item for a user that doesn't have access to it

matthew_hughes
Kilo Sage

What we have discovered is that if a user clicks on a knowledge article, if they click on a link to a catalogue item that they don't have permission to view, the following occurs:

matthew_hughes_0-1744723317848.png

From this, it's not very clear that the user doesn't have permission to view the catalogue item.

 

Does anyone know how I can include a message so that if a user tries to click on a link to a catalogue item they don't have access to, the message explains very clearly that they don't have the required access?

 

13 REPLIES 13

Ankur Bawiskar
Tera Patron
Tera Patron

@matthew_hughes 

you cannot do much here.

the KB will contain link to catalog item and user doesn't satisfy the user criteria present in "Available for" related list then that message will appear.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar The issue is that no message is appearing. It just shows a blank page. I want to be generate a message like the one below on my personal developer instance:

matthew_hughes_0-1744724979685.png

 

@matthew_hughes 

I am not sure if this will work but you can give a try

that message is shown because you opened that catalog item directly in the browser url and system checks user criteria.

what you can do is this

1) check which page you are taking the user to

2) see if you can add some widget there which will evaluate if the logged in user satisfies the user criteria for that item

3) if yes then show some message

OR Another way

1) create a UI script and inside it check which browser url is present

2) then use GlideAjax and check if user satisfies the user criteria or not

to check if user satisfies user criteria or not use this API

UserCriteriaLoader - API to Evaluate User Criteria 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@matthew_hughes 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader