Allow Guest user to download attachment

Pradyumna Das
Tera Expert

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

4 REPLIES 4

Luiz Lucena
Mega Sage

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... 

Danish Bhairag2
Tera Sage

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

 

@Danish Bhairag2 I have tried the above steps already but it didn't work.  

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,