Presentation is loading. Please wait.

Presentation is loading. Please wait.

How to Enable/Disable Ribbon button in CustomAction Element base on user’s rights? Lyudmila Zharova SharePoint Developer at MRM Worlwide lzharova077@gmail.com.

Similar presentations


Presentation on theme: "How to Enable/Disable Ribbon button in CustomAction Element base on user’s rights? Lyudmila Zharova SharePoint Developer at MRM Worlwide lzharova077@gmail.com."— Presentation transcript:

1 How to Enable/Disable Ribbon button in CustomAction Element base on user’s rights?
Lyudmila Zharova SharePoint Developer at MRM Worlwide 12/15/2010

2 Access an External List using Office Add-ins
SharePoint 2010 Extensibility Projects can be downloaded from the MSDN Code Gallery here: and use a new SharePoint Ribbon Project Template Andrew Connel explained how to: -Handle Events in the SharePoint Ribbon - Asynchronously check if a command is available in the SharePoint Ribbon: -command-is-available-in-the-sharepoint.aspx To verify if the user has permission on the item level you can use EsmaScript: get_effectiveBasePermissions().has(SP.PermissionKind.editListItems)) You can hide the Ribbon from Anonymus users and allow only logged in users with the right permissions to see it by placing SPSecurityTrimmedControl on your custom master page. Client object model focuses on the most relevant APIs for client-side development. But limiting the size of the client libraries reduces the amount of time that is required to download the libraries in the Silverlight and ECMAScript contexts. Http throttling is a new feature in SharePoint 2010 that allows the server to “back off” of serving requests when it is too busy. Requests generated prior to the server entering into the throttling mode will be completed. Access an External List using Office Add-ins • Chose Word 2010 Document Add-in • Chose the document • Added a WPF User Control • Added references • Added using statements • Created a class for data-binding • Instantiated a ClientContext • Retrieved List data

3 Permissions=” ManageLists”>
Open and check-out your master page, find where your ribbon control starts or look for <WebPartPages:SPWebPartManager id=”m” runat=”Server”/> Place this control below <Sharepoint:SPSecurityTrimmedControl runat=”server” Permissions=” ManageLists”> Find where your ribbon control ends or look for <div id=s4-workspace> and place the closing control above it </SharePoint:SPSecurityTrimmedControl> Save, check-in the master page and publish it to see the changes. Set the correct permissions in the Permissions attribute

4 How to Enable/Disable Ribbon button in CustomAction Element base on user’s rights?
Rights = " ApproveItems " </CustomAction> “Rights” attribute is optional ApproveItems - Approve a minor version of a list item or document. According to msdn article it specifies a set of rights that the user must have for the link to be visible, for example, "ApproveItems, ViewListItems, ManageAlerts". If it is not specified, the action always appears in the list of actions. To specify multiple rights, separate the values by using commas. The set of rights are grouped logically according to AND logic, which means that a user must have all the specified rights to see an action. To see all SPBasePermissions Enumeration follow this link:

5

6

7


Download ppt "How to Enable/Disable Ribbon button in CustomAction Element base on user’s rights? Lyudmila Zharova SharePoint Developer at MRM Worlwide lzharova077@gmail.com."

Similar presentations


Ads by Google