- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2024 11:26 AM
I need to create a download link for the Service Portal. The file is an Excel spreadsheet. I created the link in the Portal using the 'rich text label' variable, then added the link '/sys_attachment.do?sys_id='SYS_ID_FROM_SYS_ATTACHMENT' to this variable.
To make the file available in the attachments table, I created a system property and attached the file to it.
The download link works, however, only for those with the 'admin' role. I don't have the 'security_admin' role to add a new role to the 'read' ACLs of the sys_attachment.
The functionality should be made available to 2 specific groups. Any ideas?"
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2024 05:18 AM
Hi! Since you attached the file to the sys_properties table, the ACL is checking if the user has read access to the sys_property record. One possible solution could be to create a custom role and add it to the groups that can access the attachment. Then in your system property grant read access to the custom role.
According to the AttachmentSecurity script include (sys_script_include.do?sys_id=ffbb141c471103007a977eaecb9a712e), this should grant access to the user (with the custom role) to the attachment.
Another solution could be to navigate to the sys_attachment table, find the record and then via list edit clear the table_name. This will grant everyone access to the attachment. Then your widget could have the condition to render the link only for the users in the said groups.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2024 11:33 AM
Hi ,
Create a variable with the following link and add client script validation with the group name on that particular variable:
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2024 12:58 PM
It's a good idea, but it's experiencing the same issue as my solution. The link is accessed; however, the download doesn't occur. It remains as shown in the screenshot below:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2024 01:10 PM
Hi @caiooliveira ,
Did you replace the sys_id with your sys_id in widget code?
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth meda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2024 12:17 PM
Yes, I replaced the sys_id. The Robin John's solution has worked. I keep my solution and put the created role into the system property.