How to Show or Hide Paper Clip Attachment based on specific Role?

ican
Tera Contributor

Requirement:

Show Paper Clip Attachment to a specific role.

 

Currently there is a custom role with empty roles but have Module with Roles for access.

The Paper Clip is hidden for users with that specific role.

ican_1-1700557101555.png

 

Thanks in advance.

 

2 REPLIES 2

Community Alums
Not applicable

Hi @ican ,

There are two ways to tackle this issue in your case.

1. Either define a custom role and create an ACL on sys_attachment table with create operation to allow user to create an attachment on the sys_attachment table

2. Make changes in the OOTB Create ACLs on sys_attachment table to allow user to add attachments on the form.

Also, just for knowledge :

The user cannot attach a file when there is not CREATE and READ ACL in place that satisfies the User roles.

  1. As a first step, enable the Security Rules Debugging and look for failing ACLs in sys_attachment table. 
  2. If there are failing ACLs while debugging, open and verify why they are failing. 
  3. If not, navigate to Access Control(ACL) from nav bar and search for ACLs on sys_attachment table. Verify if there are any ACLs that matches the user roles.
  4. If there are no ACLs for the user, create READ and CREATE ACLs that matches the user role.
  5. Now verify if the user can attach the files in the form.
  6. Under script section of the ACL, write a script in order to prevent/provide access based on the business needs for that user(ex:user can access only the attachments that he attached or can attach the files to only the records that he created.)

 

I have tried the 1st solution, but then the paper clip is still hidden for that user with the specific role.