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?
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>