I am working with SharePoint 2013 on prem and I have a custom list created where users store certain info relevant to their contracts. I have not implemented permissions for this list yet, but it will have unique permissions, like certain users will only have read and others will have contribute access through SharePoint groups.
There are also workflows attached to this list and at the end of workflow users who have access will attach a file to the given list item using the 'attach a file' OOTB option available in custom list so once attached, it will then show up under Attachments column (OOTB) and its visible on Dispform and editform.
So the requirement is to hide the attachments column (containing file attachments) from DispForm and Editform for the users (part of SP group) who shouldn't view the attachments.We are using SP groups (for example Finance members) for permissions assignment.
If this is doable, can someone help me with the JS code, thanks in advance.