2

I have a site with a group "owners" and "members". I do not want members to have access to the ribbon or the the suite bar what do I have to modify in the master page to do that I believe I have found the correct section of the master page. I believe I should use the command:

<SharePoint:SPSecurityTrimmedControl> around the <div id="s4-ribbonrow"> element but I do not know how to correctly apply this. Everything I have tried so far results in an error on the site

</SharePoint:AjaxDelta>
        <div id="ms-hcTest"></div>
        <div id="s4-ribbonrow" >
        <div id="globalNavBox" class="noindex">
    <div id="ribbonBox">
    <div id="s4-ribboncont">
        <SharePoint:AjaxDelta id="DeltaSPRibbon" BlockElement="true" runat="server">
            <SharePoint:DelegateControl runat="server" ID="GlobalDelegate0" ControlId="GlobalSiteLink0" />
            <SharePoint:SPRibbon
                runat="server"
                PlaceholderElementId="RibbonContainer"
                CssFile="" >
                <SharePoint:SPRibbonPeripheralContent
                    runat="server"
                    CssClass="ms-core-defaultFont ms-dialogHidden"
                    Location="TabRowLeft">
                </SharePoint:SPRibbonPeripheralContent>
                <SharePoint:SPRibbonPeripheralContent
                    runat="server"
                    Location="TabRowRight"
                    ID="RibbonTabRowRight"
                    CssClass="s4-trc-container s4-notdlg ms-core-defaultFont">
                    <SharePoint:SPSharePromotedActionButton runat="server"/>
                    <SharePoint:DelegateControl runat="server" ControlId="PromotedActions" AllowMultipleControls="true" />
                    <SharePoint:SPSyncPromotedActionButton runat="server"/>
                    <SharePoint:PageStateActionButton id="PageStateActionButton" runat="server" Visible="false" />
5
  • Do you have to do it using markup? Would you consider using javaScript? Commented Jul 20, 2016 at 19:41
  • 2
  • I don't recommend wrapping SPSec around existing controls as it might break the page for those users. what you can do is wrap it around conditional CSS like in the answer I suggested above Commented Jul 20, 2016 at 19:44
  • Thanks alot very helpful I have added the solution to my problem if anyone ever needs
    – M_kul
    Commented Jul 20, 2016 at 21:29
  • @M_kul you should post it as an answer instead Commented Jul 20, 2016 at 21:46

2 Answers 2

4

For anyone interested I accomplished this using a simple css edit in the head of the page code below if anyone needs:

<style type="text/css">
    #contentBox  {margin-left: 20px !important;}
    #SearchBox {display:none;}
    #suiteBarTop {display:none !important;}
    #s4-ribbonrow{display:none !important;}
</style>
<Sharepoint:SPSecurityTrimmedControl runat="server"PermissionsString="FullMask">
<style type="text/css">
    #suiteBarTop{display:block !important;}
    #s4-ribbonrow{display:block !important;}
</style>
</Sharepoint:SPSecurityTrimmedControl>
0

You can Hide ribbon using SPSecurityTrimmedControl based on PermissionsString like

◾FullMask. ◾EmptyMask. ◾ManagePermissions. ◾ManageSubwebs. ◾ManageWeb. ◾AddAndCustomizePages. ◾BrowseDirectories. ◾ViewPages. ◾EnumeratePermissions. ◾ManageAlerts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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