Archive for April 1st, 2008

MOSS 2007: Hide Edit Page in Site Actions Menu

This always annoyed me.  Users with contribute rights are given the right to "Edit Page" under site actions.  This quick write-up resolves that issue by only providing that function to users with Full Control, rather than Contribute.  As always, be careful when modifying default.master and make sure you have backups readily available.

  1. Open the master page for the site.

  2. 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);"
            />

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

  4. 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"
            />

  5. Save the master page and login with an account that does not have Full Control, but is not read only either…  The Site Actions drop down should now resemble:

Hide Edit Page

Hide Edit Page in Site Actions Menu - The SharePoint Redemption