Please upgrade your web browser now. Internet Explorer 6 is no longer supported.
Zac Smith
SharePoint, WSS and MOSS development.

SPSecurityTrimmedControl - possible values for PermissionsString

by Zac Smith 31-May-07, 4 Comments
A while back I blogged about how you could use the SPSecurityTrimmedControl to manage the display of content based on user permissions. The PermissionsString is where you specify what permissions the user must have to display the content. Until now I wasn't sure what values you could use, and the SDK although much imporoved wasn't exactly forthcoming. While using a reflector I managed to track down the SPBasePermissions enum which reveals all the possible values.
 
And here they are grouped in the same way you would find them in the SharePoint permissions list:
 
List Permissions
 
Site Permissions
EnumeratePermissions
 
Personal Permissions
 
 
And an example of usage if you are reading this and haven't seen the control in action before:
 
<SharePoint:SPSecurityTrimmedControl PermissionsString="AddAndCustomizePages, ManageLists" runat="server"
    <%-- some content here ... %>
</SharePoint:SPSecurityTrimmedControl>
Categories:
4 responses so far:
  • Sunday, 31 May 2009 08:19 by maria arrubio
    i have an internet facing site, and using PermissionsString="AddAndCustomizePages" displays the site action menu to Site Owners only, what specific permission string can i use to have the site action menu displayed to site members?
  • Sunday, 31 May 2009 08:19 by Rahul
    This is really superb..
  • Sunday, 31 May 2009 08:19 by Where's the older blog post?
    Thanks for a good reference resource. You said: "A while back I blogged about how you could use the SPSecurityTrimmedControl to manage the display of content based on user permissions." I'd be interested in reading this older blog post, but can't find it on this site. Is it to be found elsewhere? Thanks, Oskar Austegard http://mo.notono.us
  • Sunday, 31 May 2009 08:19 by RE:Where's the older blog post?
    At was part of a bigger article named "Guide to making SharePoint XHTML Compliant" http://blogs.provoke.co.nz/Zac/Lists/Posts/Post.aspx?ID=5 Zac

 

Post a Comment:
Name:
URL:
Email:
Comments: