Skip to main content


Showing posts with the label Security Trimmed Controls

Security Trimmed Controls in SharePoint

Let’s say you have a control on your page that you want only a certain group of users to see. Fortunately, SharePoint has a built-in control that lets you hide controls to which users do not have the necessary permissions.  This control is the SPSecurityTrimmedControl. <Sharepoint:SPSecurityTrimmedControl runat=”server” Permissions=”ManageLists”>
Place your control(s) here</SharePoint:SPSecurityTrimmedControl> All you have to do is wrap your control with this security control and set the correct permissions in the Permissions attribute. The Permissions attribute, when used in Visual Studio or Designer, will have intellisense and will be filled with the following properties obtained from  Whatever permissions you specify will be required by the user in order to view the control(s) inside of the SPSecurityTrimmedControl:
Member name  Description
EmptyMask Has no permissions on the W…