Thursday, February 21, 2008

SharePoint MOSS 2007: Hide MasterPage content based on SharePoint Security

I found a nice blog post about hiding the top publishing toolbar from anonymous users:

The code is simple, wrap all your .NET and HTML in the following tag, to hide it from everything but the

<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="BrowseDirectories">

<!-- HTML/.Net tags here to hide if not logged in -->


With that, I was able to hide the entire top "control" bar, including the login link. Users who need to authenticate will need another link somewhere on the site, or they will need to bookmark a url like this:


No comments: