Allow Guest user to download attachment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 11:33 AM
Hi Experts,
Could you help me with the following requirements?
We have a public page in the service portal and a custom public widget with a download button on that page. With a click of that, button it should download one file which is present in the sys_attachment table for guest or external users.
Please let me know if anyone has achieved this.
Thanks,
Pradyumna Das
https://dev91529.service-now.com/pradyumna_june15
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 12:41 PM - edited 10-31-2023 12:46 PM
Hi @Pradyumna Das ,
On which table is this attachment located?
There are some ACL's on sys_attachment table for READ operation, you may need to double check them before anything else.
Then, you may need to create an ACL specific for this.
EDIT:
However it may not work, see this:
https://www.servicenow.com/community/service-management-forum/public-catalog-item-attachment/m-p/403...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 09:40 PM
Hi @Pradyumna Das ,
For the above requirement you can try creating two different ACLs on attachment table.
- 1st ACL for role snc_external users,
Where condition will be Sys Id is (mention that specific attachment sys Id here')
This way you will be sharing only that specific file for external role user on attachment table
For guest users I believe are the users who cannot login to the instance then in that scenario create one more ACL with no role but under condition giving the same Sys ID is (mention that specific attachment Sys I'd) which will share only one record with no role users. This way I presume the guest users should be able to download that specific attachment when clicked on the button.
2nd scenario is untested.
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2023 04:25 AM
@Danish Bhairag2 I have tried the above steps already but it didn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2023 06:06 AM
Hi Danish,
snc_external role should be assigned to an "external" user, right?
Meaning, a user account must exist in sys_user table, which I think is not the case here.
Regards,