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

  • Why not hide the whole ribbon instead of these two tabs only!? – Rami.Shareef Aug 28 '12 at 13:30
  • It is a requirement that the Sign In control is still visible and therefore not possible to hide the entire ribbon. – OG_Mike Aug 28 '12 at 14:20
1

I think it is PermissionsString not Permissions.

<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="ViewFormPages">
     ...
</SharePoint:SPSecurityTrimmedControl>
  • 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 9: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: sharepointpsscripts.codeplex.com/releases/view/21699 – Hugh Wood Aug 29 '12 at 9:09
  • sharepoint.stackexchange.com/questions/26861/… (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 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.