2

I have a sharepoint standard view , i want to hide "export excel" ribbon button by permission Ex: i have 2 custom site permssison (A and B), and i want to hide "export excel" ribbon button with user have A permssion Thanks

1 Answer 1

2

You can use the SPRibbon.TrimById(controlId) method to hide controls.

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:

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsecurableobject.doesuserhavepermissions.aspx

For all working code you can refer : http://www.gauravgat.com/2011/02/hiding-buttonscontrols-on-sharepoint.html

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.