- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2023 08:39 PM
There is a function at top of forms,users can use it to manage attachment.
I want to realize that only specific user(such as assign to )can download files.(It is also ok to not display the entire function )
How should I do?Please help me,please~
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2023 09:15 PM
Hi @Shirley7 ,
You can achieve this by writing a read ACL on the sys_attachment table.
if(current.table_name=="your_table_name") { if(gs.getUser().isMemberOf('your_group name')) { answer =true; } else { answer=false } }
Please mark the answer as helpful, if it helped you accordingly.
Thanks,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2023 09:16 PM
HI @Shirley7 ,
To restrict the download of attachments on a form to specific users, you can use Access Control Rules (ACRs). Here's how you can do it:
- Navigate to the sys_attachment table.
- Create a new Access Control Rule.
- Set the following conditions in the ACR:
- Operation: read
- Role: [specific role(s) that can download attachments]
- Advanced: [add a condition to limit access to attachments assigned to a specific user or group] ,the condition would be something like "assigned_to=javascript:gs.getUserID()".
- Save the ACR.
If my response helps you to resolve the issue close the question by ✅Accepting solution and hit 👍thumb icon. From Correct answers others will get benefited in future.
Thanks,
Ratnakar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 01:29 AM
This is not working for me as well