SharePoint Blogs / SharePoint University
SharePoint Blogs and SharePoint University - all in one place!
Need SharePoint Training? Attend a SharePoint Bootcamp!

Please delete cookies related to sharepointblogs.com and sharepointu.com to resolve login issues!

Hide Edit Page in Site Actions Menu

I had a request from a client to hide the Edit Page option under the Site Actions menu for all users without Full Control permissions.  I performed the following steps to remove the edit page option for user's without the managesubwebs right.

  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


Posted 01-14-2008 12:49 PM by Jeff Holliday

Comments

Links (1/15/2008) « Steve Pietrek’s SharePoint Stuff wrote Links (1/15/2008) &laquo; Steve Pietrek&#8217;s SharePoint Stuff
on 01-15-2008 8:40 PM

Pingback from  Links (1/15/2008) &laquo; Steve Pietrek&#8217;s SharePoint Stuff

Jim Gregory wrote re: Hide Edit Page in Site Actions Menu
on 02-13-2008 2:25 PM

I spent like 20 minutes googling to find out how to do this, and you had exactly what I needed. Thanks!

Jay Morton wrote re: Hide Edit Page in Site Actions Menu
on 02-14-2008 1:32 PM

I followed this to the letter but it didn't work.  The Edit Page still shows and is accessible in the Site Actions menu for SP2007.  The user assigned contributor permissions for the site.

Any thoughts?

Thanks.

Robert wrote re: Hide Edit Page in Site Actions Menu
on 03-19-2008 10:49 AM

You have to approve the page after saving, otherwise it stays in draft version and no one else will see the above fix applied.

MOSS 2007: Hide Edit Page in Site Actions Menu at ps> get-content wrote MOSS 2007: Hide Edit Page in Site Actions Menu at ps&gt; get-content
on 04-01-2008 8:14 AM

Pingback from  MOSS 2007: Hide Edit Page in Site Actions Menu at  ps&gt; get-content

Mike's Blog wrote Hiding MOSS functionality in the master page or a page layout
on 07-22-2008 7:22 PM

Recently I was asked how we could show and hide things based on user permission, without writing a custom

daastan wrote re: Hide Edit Page in Site Actions Menu
on 08-06-2008 11:55 AM

hi

I have smiliart request. I want to show " Edit page" option only for Admin but hide it from " Contributors"

Any Thoughts please ?

Development wrote Skjul SiteActions Menupunkter i Sharepoint
on 10-29-2008 4:55 AM

Skjul SiteActions Menupunkter i Sharepoint

Webudvikling wrote Skjul SiteActions Menupunkter i Sharepoint
on 11-22-2008 7:24 AM

&lt;p&gt;&amp;#160;&lt;/p&gt; ...

Joydeep Banerjee wrote re: Hide Edit Page in Site Actions Menu
on 03-19-2009 6:44 AM

This was very useful for me

Software Engineer

Sonata-Software

yogendra wrote re: Hide Edit Page in Site Actions Menu
on 04-07-2009 5:40 PM

can we do it through feature

Jeff Holliday wrote re: Hide Edit Page in Site Actions Menu
on 04-20-2009 2:17 PM

I have not attempted it with a feature directly.  Only deploying a customer master page as a feature that also contained the code change above.

Jeff

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Need SharePoint Training? Attend a SharePoint Bootcamp!
Posts (c) their respective authors. Everything else (c) 2009 SharePoint Experts, Inc.