Friday, August 14, 2009

Hiding "Edit Page" option in "Site Actions" menu

This is about SITE ACTIONS menu.
I needed to hide the "Edit Page" option under the "Site Actions" menu for all users without Full Control permissions. The following steps removed the edit page option for user's without the managesubwebs right.

Open the master page for the site.
Find the following lines of code:
<SharePoint:MenuItemTemplate runat="server" id="MenuItem_EditPage" Text="<%$Resources:wss,siteactions_editpage%>" Description="<%$Resources:wss,siteactions_editpagedescription%>" ImageUrl="/_layouts/images/ActionsEditPage.gif" MenuGroupId="100" Sequence="200" ClientOnClickNavigateUrl="BLOCKED SCRIPTMSOLayout_ChangeLayoutMode(false);" />

Add to the following lines to the code:
PermissionsString="ManageSubwebs" PermissionMode="Any"

The code should now look like:
<SharePoint:MenuItemTemplate runat="server" id="MenuItem_EditPage" Text="<%$Resources:wss,siteactions_editpage%>" Description="<%$Resources:wss,siteactions_editpagedescription%>" ImageUrl="/_layouts/images/ActionsEditPage.gif" MenuGroupId="100" Sequence="200" ClientOnClickNavigateUrl="BLOCKED SCRIPTMSOLayout_ChangeLayoutMode(false);" PermissionsString="ManageSubwebs" PermissionMode="Any" />

Save the master page and you are done. Thanks for visiting.

No comments:

Post a Comment