1

I would like to hide both the Browse & Page tabs in the SharePoint 2010 ribbon.

As I hid other controls in my master page with SPSecurityTrimmedControl I am having difficulties hiding those tabs for Anonymous Users.

In my custom master page (based on the V4) I put the following tags between the SPSecTrimControl:

<Sharepoint:SPSecurityTrimmedControl runat="server" Permissions="ManageWeb">
<SharePoint:SPRibbonPeripheralContent
            runat="server"
            Location="TabRowRight"
            ID="RibbonTabRowRight"
            CssClass="s4-trc-container s4-notdlg">      
<SharePoint:DelegateControl runat="server" ID="GlobalDelegate0" ControlId="GlobalSiteLink0" />
 <a href="#" tabindex="-1" style="display:none"></a><a href="#" tabindex="-1" style="display:none"></a>
 <div class="s4-trc-container-menu">
     <div>
        <wssuc:Welcome id="IdWelcome" runat="server" EnableViewState="false">
        </wssuc:Welcome>
        <wssuc:MUISelector ID="IdMuiSelector" runat="server"/>
    </div>
</div>  

<SharePoint:DelegateControl ControlId="GlobalSiteLink2" ID="GlobalDelegate2" Scope="Farm" runat="server" />
<span>
    <span class="s4-devdashboard">
        <Sharepoint:DeveloperDashboardLauncher
            ID="DeveloperDashboardLauncher"
            NavigateUrl="javascript:ToggleDeveloperDashboard()"
            runat="server"
            ImageUrl="/_layouts/images/fgimg.png"
            Text="<%$Resources:wss,multipages_launchdevdashalt_text%>"
            OffsetX=0
            OffsetY=222
            Height=16
            Width=16 />
    </span>
</span>
</SharePoint:SPRibbonPeripheralContent>

Both tabs are still shown for all users.

Any help on this one or information is welcome!

Thanks in advance

OG_Mike
  • 122
  • 2
  • 12

1 Answers1

1

I think it is PermissionsString not Permissions.

<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="ViewFormPages">
     ...
</SharePoint:SPSecurityTrimmedControl>
Hugh Wood
  • 6,285
  • 1
  • 26
  • 45
  • Thanks for the suggestion. Changing it to "PermissionsString" did not work either, the tabs are still visible for all kinds of users. – OG_Mike Aug 29 '12 at 09:05
  • I've copied that from my master page which works, so all I can think is that the user is gaining the permission ManageWeb, you can check this using the check permissions script from here: http://sharepointpsscripts.codeplex.com/releases/view/21699 – Hugh Wood Aug 29 '12 at 09:09
  • http://sharepoint.stackexchange.com/questions/26861/hiding-buttons-of-the-ribbon-bar (Why I didn't link you to this in the first place I don't know).. I was having a brain fart I thought you where hiding the entire ribbon... – Hugh Wood Aug 29 '12 at 09:15