1

I want to hide the whole top bar in SharePoint site (including Site Actions link, search bar, etc.) and also Quick Launch menu on the left. But the thing is, I want to hide those panels only for unauthorized users, while authorized users would be able to access those links when they go to Site Settings page. Is there any way of achieving this by editing Master Page? Or maybe you could suggest other way for this?

  • What i understand , Unauthorized user you mean anonymous user? – Ravindra Nov 23 '15 at 6:29
  • Yes, exactly, because by the default, if the user hasn't reached the site in the past he (or she) is going to be unauthorized (anonymous) user. Thank you. – Mangustas Nov 23 '15 at 19:03
0

As member @Ravindra suggested, you can use SPSecurityTrimmedControl - edit MasterPage file and all code for top navigation, ribbon and side navigation insert into SPSecurityTrimmedControl code block. For example:

<Sharepoint:SPSecurityTrimmedControl runat="server" Permissions="AuthenticatedUsersOnly"> 
   <!-- all HTML, CSS, JS and SharePoint controls that needs to be available to authenticated user only -->
   <div id="s4-ribbonrow">
      ...
   </div>
</SharePoint:SPSecurityTrimmedControl>
1

You can use SPSecurity trimmed control. Below is the sample snippet ....

Now all controls inside the SPSecurityTrimmedControls will be hidden to anonymous users.

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.