Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm working on a new area of my public facing SharePoint 2010 site (i.e. using Publishing templates), that will include an ootb Discussion Board.

The site is for our customers, who all have read access to the various parts of the site. As such, I didn't want to show the Ribbon to these users, so I used security trimming to only show the Ribbon to users with the abilities of 'ManageWeb,AddAndCustomizePages'.

The down side of this is, when allowing a user to add a new discussion, they cannot see the ribbon and therefore cannot use any of the text formatting options, such as bold, or font colors.

I'm wondering if any of the following are possible:

  • Hide the ribbon from all public (but logged in) users, except when the add new discussion board page is shown, but still keep the ribbon visible to site authors/owners.
  • Add a second ribbon somewhere else in the page (i.e. below our hidden ribbon and header) that allows users to use formatting in the textarea for discussion Body.

Any other ideas?

The best solution, for me, would be a second ribbon that allows editing, but I kinda doubt that's possible.

Kevin

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Kevin,

I see this come up a lot in my travels. What I usually do (depending on requirements) is set the s4-ribbonrow div to display:none in CSS.

<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle" style="display: none;">

Then find the closing div tag for the div above. Directly below it (as a sibling element) add your SPSecurityTrimmedControl:

<SharePoint:SPSecurityTrimmedControl runat="server" Permissions="AddListItems" PermissionContext="CurrentList">
    <script type="text/javascript">
        document.getElementById('s4-ribbonrow').style.display = "block";
    </script>
</SharePoint:SPSecurityTrimmedControl>

The important pieces are the attribute value AddListItems of Permissions and the PermissionContext="CurrentList". This means that if the user can add list items to whatever list the user is currently looking at, they'll be able to see the ribbon. If they can only read the list, the ribbon will NOT show.

You may need to add an additional Security Trimmed Control with the ManageWeb permission mask and no PermissionContext for the ribbon to show to administrators and full control users on pages like site settings.

Let me know if you have any questions.

-@SharePointAP

share|improve this answer
    
just what I needed. Thanks :) –  QMKevin Jun 13 '12 at 21:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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