I am currently using the method stated in the MSDN Walkthrough to remove the "Library" tab from the Library Tools contextual tab group and it is working for the site for all users.

However, I would like such solution conditionally to be applicable only to non-administrators. I have tried adding "Rights" element in the xml but it is not working as intended.

How do I go about doing this?


You can use other OM methods to determine the user's permission and call the TrimById method accordingly. For example, you could use DoesUserHavePermissions on the page's list item:


Please look into following link

Hiding buttons of the Ribbon Bar

| improve this answer | |

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.