Scenario:
Client wanted to hide the ribbon from everyone except admin.
Solution:
1) Open your SharePoint master page
2) Add the following style in head section
3) Now find the start of the "s4-ribbonrow" tag and add following block before this:
<style type="text/css">
#s4-ribbonrow { display : none; }
</style>
4) Save the new master page and publish it.
<Sharepoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl2" runat="server" PermissionsString="AddAndCustomizePages">
<style type="text/css">
#s4-ribbonrow { display : block; }
</script>
</Sharepoint:SPSecurityTrimmedControl>
Article:
Similar article ( Thanks nilesh ) Hide ribbon , Hide/Show Codeplex project
2 comments:
Nice trick. You saved my day :)
In my case, I needed users to be able to have access to the Welcome control and therefore moved it out of the ribbonRow.
Great, Thanks!
Post a Comment