How to Restrict users to download attachments

Afrin12
Tera Contributor

Hi

How can we encrypt attachment so it will not be visible to any user but the members of the  groups.

Thanks in Advance.

1 ACCEPTED SOLUTION

Mohith Devatte
Tera Sage
Tera Sage

hello @Afrin12 ,

You can create a read Acl on sys_attachment table where in the advanced condition you can write a script saying 

if(current.table_name=="your_table_name")

{

if(gs.getUser().isMemberOf('your_group name'))

{

answer =true;

}

else

{

answer=false

}

}

Hope this helps 

Mark my answer correct if this helps ypu 

Thanks

 

View solution in original post

4 REPLIES 4

Mohith Devatte
Tera Sage
Tera Sage

hello @Afrin12 ,

You can create a read Acl on sys_attachment table where in the advanced condition you can write a script saying 

if(current.table_name=="your_table_name")

{

if(gs.getUser().isMemberOf('your_group name'))

{

answer =true;

}

else

{

answer=false

}

}

Hope this helps 

Mark my answer correct if this helps ypu 

Thanks

 

Thank you Mohit For your quick reply.

Hi Mohith,

 

The requirement is to restrict specific set of users from downloading attachments in KB articles. So, I wrote a read ACL on sys_attachment table with sys_id of the attachments in the kb articles but it is not working. 

Saravanan2601_0-1703084768341.png

 

Saravanan2601_1-1703084845880.png

 

Please let me know if I am missing out something.


@Mohith Devatte ,

 

I have tried this but not getting exact result. please let me know how to achieve this.

 

please help me here.

 

Thanks