Setting Rights for custom actions using Sharepoint Designer 2010 in Sharepoint online, Office 365

Shameem Ahmed 10 March 2012 0




Setting Rights for
custom actions using Sharepoint Designer 2010 in Sharepoint online, Office 365

This is a continuation of previous article:

http://techwirenews.com/creating-custom-actions-using-sharepoint-designer-2010-for-sharepoint-online-office-365/

Custom Actions lets to customize Sharepoint Ribbon UI, you can add your own buttons, groups & tabs to the Ribbon UI of sharepoint.  You can also customize various context menus provided by Sharepoint.

Setting Rights on custom actions lets you control the availability of the custom action to the end users based on their Roles. Following Roles are available in Sharepoint 2010.

 

List/document perms
ViewListItems
AddListItems
EditListItems
DeleteListItems
ApproveItems
OpenItems
ViewVersions
DeleteVersions
CancelCheckout
ManagePersonalViews
ManageLists
ViewFormPages

Web level perms
Open
ViewPages
AddAndCustomizePages
ApplyThemeAndBorder
ApplyStyleSheets
ViewUsageData
CreateSSCSite
ManageSubwebs
CreateGroups
ManagePermissions
BrowseDirectories
BrowseUserInfo
AddDelPrivateWebParts
UpdatePersonalWebParts
ManageWeb
UseRemoteAPIs
ManageAlerts
CreateAlerts
EditMyUserInfo

Special perms
EnumeratePermissions

Refer to http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spbasepermissions.aspx for more details on Rights.

Solution

We’re going to use the custom action created in the previous article and add a permission mask so that the custom action is available only to those users who has Manage permission on the list. Users with permission level below Manager will not see the custom action in the context menu.

To restrict permission to only manager, we need to use ManageLists permission mask. This permission mask will let the custom action to appear only for the users who has Manage permission on the Sharepoint list.

1. Open sharepoint designer 2010

2. Press Open Site and enter URL of your sharepoint site, you need to provide the credentials to connect to the site.

3. Select Lists and Libraries from Site Objects panel in the left

4. Click on the list name for which you want to add the custom form

5. Select Custom Action for the list

6. Double Click on the custom action to open Create Custom Action window

7. Type ManageLists in Rights mask textbox.

Summary

That’s it, save your changes in sharepoint designer 2010 and refresh your sharepoint site. You can see your custom action by selecting a list item and opening the context menu. The custom action will appear only for the users who has Manage rights on the Sharepoint list.

IT training courses




Shameem Ahmed (370 Posts)

Leave A Response »