Hide items from users

You can hide some functions from users on a page in Sharepoint by adding the “security trimming control” – it’s really useful. For example, the “Site Actions”-button should be hidden from anonymous users.

Put the following tag around the Site Action control:

Sharepoint:SPSecurityTrimmedControl runat=”server” PermissionsString=”BrowseDirectories”>
[Site Actions content holder here]

/Sharepoint:SPSecurityTrimmedControl>

This permission string used the “BrowseDirectories” which is a very low level of permission. You can also use “AddItems” and so on, to allow users that has EditItems to see the SiteAction button but hide it from those who can Add items.

Share this blog post:

Leave a Reply

avatar

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
Notify of