Wednesday, December 22, 2010

Security Trimmed Controls in SharePoint

To apply permissions for a controls in SharePoint, use the below code.

<sharepoint:spsecuritytrimmedcontrol permissions=”ManageLists” runat=”server”>
Place your control(s) here
</sharepoint:spsecuritytrimmedcontrol>

Available Permissions:

AddAndCustomizePages
AddDelPrivateWebParts
AddListItems
ApplyStyleSheets
ApplyThemeAndBorder
ApproveItems
BrowseDirectories
BrowseUserInfo
CancelCheckout
CreateAlerts
CreateGroups
CreateSSCSite
DeleteListItems
DeleteVersions
EditListItems
EditMyUserInfo
EmptyMask
EnumeratePermissions
FullMask
ManageAlerts
ManageLists
ManagePermissions
ManagePersonalViews
ManageSubwebs
ManageWeb
Open
OpenItems
UpdatePersonalWebParts
UseClientIntegration
UseRemoteAPIs
ViewFormPages
ViewListItems
ViewPages
ViewUsageData
ViewVersions