How to hide attachments attached to a catalog Item on RITM form (backend view)?

AlpUtkuM
Mega Sage

Hello all,

 

I would like ask how can I hide attachments attached to a catalog Item on RITM form except members of an assignment group?

 

I have created "Deny Unless" ACL but It works on Table level (RITM Table) but I want It to be working for attachments attached to a specific catalog Item.

 

Thanks,

 

Alp Utku

 

 

3 REPLIES 3

thomaskennedy
Tera Guru

Did you try any means of doing this in the UI? I ask because while your requirement is clearly stated -- hide attachments on a catalog item -- the thing you tried relates to table access which is not a UI thing.

J Siva
Kilo Patron

Hi @AlpUtkuM 

Please create a "Deny Unless Read" ACL for the sys_attachment table.

Utilize an advanced script to enforce the ACL exclusively on the RITM associated with a specific catalog item. Additionally, ensure that the validation process checks whether the user is a member of the RITM assignment group.

Regards,

Siva

Ankur Bawiskar
Tera Patron

@AlpUtkuM 

so after submitting the RITM, the attachment on RITM header should be seen only for particular group member?

If yes then you can use table.None READ ACL on sys_attachment table

Condition: Table Name = sc_req_item

Advanced script:

var gr = new GlideRecord("sc_req_item");
gr.addQuery("cat_item.name", "Your Item Name Here");
gr.addQuery('sys_id', current.table_sys_id);
gr.query();
if (gr.next()) {
    if (gs.getUser().isMemberOf('Group SysId'))
        answer = true;
    else
        answer = false;
}

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader