Hide Ribbon and Suite Bar from Anonymous Users

Posted on Updated on

SharePoint 2013, like 2010 have Trimmed Controls in order to define display rules for Authentications Roles. In SharePoint 2013 we have the Suite Bar, you must hide it also as Trimmed like this

Find the <body in Master Page and add the <style>

<body>
    <style>
        #s4-ribbonrow {
            display: none;
        }
    </style>
    <style>
        #suiteBar {
            display: none;
        }
    </style>
 
Add the Trimmed Control for before <div id=”s4-titlerow” for permissions PermissionsString=”AddAndCustomizePages”
 

<SharePoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControlRibbon" runat="server" PermissionsString="AddAndCustomizePages">
    <script type="text/javascript">
        document.getElementById("s4-ribbonrow").style.display = "block";
        document.getElementById("suiteBar").style.display = "block";
    </script>
</SharePoint:SPSecurityTrimmedControl> 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s