Display Page Content Based On Permissions Instead of Groups

There are instances where you want to keep certain portions of your masterpage hidden from certain types of users.  For instance, you may not want all of your users to see the “My Site” link.   Add the following wrapper to whatever you wish to trim permissions for.  Below is a list of all the different permission types.  Just plug in the values into the PermissionsString for the ones you want.

<SharePoint:SPSecurityTrimmedControl PermissionsString=AddAndCustomizePages, ManageLists runat=server>
<%– some content here … %>
</SharePoint:SPSecurityTrimmedControl>

Other Variables:

List Permissions
ManageLists
CancelCheckout
AddListItems
EditListItems
DeleteListItems
ViewListItems
ApproveItems
OpenItems
ViewVersions
DeleteVersions
CreateAlerts
ViewFormPages

Site Permissions
ManagePermissions
ViewUsageData
ManageSubwebs
ManageWeb
AddAndCustomizePages
ApplyThemeAndBorder
ApplyStyleSheets
CreateGroups
BrowseDirectories
CreateSSCSite
ViewPages
EnumeratePermissions
BrowseUserInfo
ManageAlerts
UseRemoteAPIs
UseClientIntegration
Open
EditMyUserInfo

Personal Permissions
ManagePersonalViews
AddDelPrivateWebParts
UpdatePersonalWebParts

Posted in SharePoint 2007.

Leave a Reply

Your email address will not be published. Required fields are marked *