Dec 03, 2015
To further allow this behaviour to be exhibited only for some users you set the web part’s target audience to a group of users. Here, we learn how to achieve this. The behaviour we are concerned with here is hiding attachments from certain groups of users in DispForm.aspx, but of course, you can extend this to any other behaviour.
DispForm.aspx is the page that is called when you view properties of a list item. On this page you normally see data for each field.
However, as mentioned before, you can write your own code to perform what you want (don’t forget to save the page).
If you now show the page in SharePoint you’ll notice that no one will be able to see attachments when they view the properties of a list item.
To hide it from only certain users, first create a Group that includes those users and then key in the name of the group in the Target Audience section of the Web Part. To get to the Target Audience section you need to be in Edit mode of the page. Show the Content Editor web parts’ Properties task pane and go to the bottom of Advanced section. There you’ll see the Target Audience.
If you'd like more information, take a look at New Horizons' SharePoint training courses.