对非管理员隐藏Site Actions的菜单
If your site collection was created using the Publishing template, then you can use this fix to hide the New Page option from the Site Actions menu:
- Go to Site Settings - Master Pages and Page Layouts
- Open the Editing Menu folder
- Edit CustomSiteAction.xml
- Paste the following XML into the CustomSiteAction.xml file
<?xml version="1.0" encoding="utf-8" ?> <Console> <references> <reference TagPrefix="cms" assembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" namespace="Microsoft.SharePoint.Publishing.WebControls.EditingMenuActions" /> </references> <structure > <ConsoleNode ConfigMenu="Delete" ChangedNodeID="wsaCreatePage" /> </structure> </Console>
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
<?xml version="1.0" encoding="utf-8" ?> <Console> <customfile FileName="CustomSiteAction" /> <references> <reference TagPrefix="cms" assembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" namespace="Microsoft.SharePoint.Publishing.WebControls.EditingMenuActions" /> </references> <structure > <ConsoleNode Action="cms:CreateNewsLinkAction" DisplayText="cms,siteactions_createnewslink_displaytext" Description="cms,siteactions_createnewsLink_description" UseResourceFile="true" MenuGroupId="100" Sequence="15" PermissionContext="CurrentList" HideIfDisabled="true" ImageUrl="/_layouts/images/Actionscreate.gif" ID="wsaCreateNewsLink"/> <ConsoleNode Action="cms:SiteDirectoryBrokenLinksCheckerAction" DisplayText="cms,siteactions_brokenlinkschecker_displaytext" Description="cms,siteactions_brokenlinkschecker_description" UseResourceFile="true" MenuGroupId="100" Sequence="20" PermissionContext="CurrentSite" HideIfDisabled="true" ID="wsaBrknLinksScan"/> <ConsoleNode Action="cms:SwitchToAuthoringModeAction" HideIfDisabled="true" DisplayText="cms,siteactions_editpage_displaytext" Description="cms,siteactions_editpage_description" UseResourceFile="true" MenuGroupId="100" Sequence="50" PermissionContext="CurrentItem" ConfigMenu="Replace" ImageUrl="/_layouts/images/ActionsEditPage.gif" ID="wsaEditPage" ChangedNodeID="MenuItem_EditPage" /> <ConsoleNode Action="cms:CreateNewPublishingPageAction" HideIfDisabled="true" UseResourceFile="true" MenuGroupId="100" Sequence="60" PermissionContext="CurrentList" ImageUrl="/_layouts/images/crtpage.gif" UIVersion="3" ID="wsaCreatePage"/> <ConsoleNode Action="cms:CreateNewPublishingPageAction" HideIfDisabled="true" UseResourceFile="true" MenuGroupId="200" Sequence="210" PermissionContext="CurrentList" ImageUrl="/_layouts/images/crtpage.gif" ID="wsaCreatePage" UIVersion="4" ConfigMenu="Replace" ChangedNodeID="MenuItem_CreatePage"/> <ConsoleNode Action="cms:CreateNewSiteAction" DisplayText="cms,siteactions_createsite_displaytext" Description="cms,siteactions_createsite_description" UseResourceFile="true" ImageUrl="/_layouts/images/crtsite.gif" MenuGroupId="100" Sequence="70" PermissionContext="CurrentSite" UIVersion="3" ID="wsaCreateSite"/> <ConsoleNode Action="cms:ReviewPublishingPageAction" UseResourceFile="true" MenuGroupId="100" Sequence="80" PermissionContext="CurrentItem" HideStates="EditingMenuEnabled" UIVersion="3" ID="wsaShowMenu"/> <ConsoleNode Action="cms:ReviewPublishingPageAction" UseResourceFile="true" MenuGroupId="100" Sequence="80" PermissionContext="CurrentItem" HideStates="(EditingMenuEnabled)||(IsPublishingPageFalse)||(IsRibbonAlwaysShownTrue)" UIVersion="4" ImageUrl="/_layouts/images/RibbonShowHH.png" ID="wsaShowMenu"/> <ConsoleNode Action="cms:ExitMenuAction" UseResourceFile="true" MenuGroupId="100" Sequence="90" PermissionContext="CurrentItem" HideStates="EditingMenuDisabled" UIVersion="3" ID="wsaHideMenu"/> <ConsoleNode Action="cms:ExitMenuAction" UseResourceFile="true" MenuGroupId="100" Sequence="90" PermissionContext="CurrentItem" HideStates="(EditingMenuDisabled)||(IsPublishingPageFalse)||(IsRibbonAlwaysShownTrue)" UIVersion="4" ImageUrl="/_layouts/images/RibbonHideHH.png" ID="wsaHideMenu"/> <ConsoleNode Action="cms:ViewAllSiteContentAction" DisplayText="cms,siteactions_viewallsitecontent_displaytext" Description="cms,siteactions_viewallsitecontent_description" UseResourceFile="true" MenuGroupId="200" Sequence="150" PermissionContext="CurrentSite" ImageUrl="/_layouts/images/vwcntnt.gif" UIVersion="3" ID="wsaViewAllContent" /> <ConsoleNode ConfigMenu="Delete" UIVersion="3" ChangedNodeID="MenuItem_Create"/> <ConsoleNode NodeClass="cms:ReportsNode" UseResourceFile="true" MenuGroupId="200" ImageUrl="/_layouts/images/ViewReportsHH.png" Sequence="175" PermissionContext="CurrentSite" NavigateUrl="javascript:" UserRights="EmptyMask" UIVersion="3" ID="saShowReportsTP"/> <ConsoleNode ConfigMenu="Delete" UIVersion="3" ChangedNodeID="MenuItem_Settings"/> <ConsoleNode DisplayText="cms,siteactions_sitesettingssubmenu_displaytext" Description="cms,siteactions_sitesettingssubmenu_description" UseResourceFile="true" MenuGroupId="300" Sequence="350" ImageUrl="/_layouts/images/ActionsSettings.gif" UserRights="ManagePermissions|ManageWeb|ManageSubwebs|AddAndCustomizePages|ApplyThemeAndBorder|ManageAlerts|ManageLists|ViewUsageData" RequiredRightsMode="Any" PermissionContext="CurrentSite" NavigateUrl="javascript:" UIVersion="3" ID="SiteSettingsOptions"> <ConsoleNode NavigateUrl="_layouts/settings.aspx" DisplayText="cms,siteactions_modifysitesettings_displaytext" Description="cms,siteactions_modifysitesettings_description" UseResourceFile="true" PermissionContext="CurrentSite" IsSiteRelative="true" ImageUrl="/_layouts/images/ActionsSettings.gif" ID="AllSiteSettings" MenuGroupId="100" Sequence="50" UserRights="ManagePermissions|ManageWeb|ManageSubwebs|AddAndCustomizePages|ApplyThemeAndBorder|ManageAlerts|ManageLists|ViewUsageData" RequiredRightsMode="Any"/> <ConsoleNode NavigateUrl="_layouts/people.aspx" DisplayText="cms,siteactions_peopleandgroups_displaytext" Description="cms,siteactions_peopleandgroups_description" UseResourceFile="true" PermissionContext="CurrentSite" IsSiteRelative="true" ID="PeopleAndGroup" MenuGroupId="200" Sequence="125" UserRights="BrowseUserInfo"/> <ConsoleNode Action="cms:ModifyNavigationAction" DisplayText="cms,siteactions_modifynavigation_displaytext" Description="cms,siteactions_modifynavigation_description" UseResourceFile="true" PermissionContext="CurrentSite" MenuGroupId="200" Sequence="150" ID="wsaModifyNavigation"/> <ConsoleNode Action="cms:ModifyPagesLibrarySettingsAction" DisplayText="cms,siteactions_modifypageslibrarysettings_displaytext" Description="cms,siteactions_modifypageslibrarysettings_description" UseResourceFile="true" PermissionContext="CurrentSite" ID="ModifyPagesLibrarySettings" MenuGroupId="200" Sequence="175" HideIfDisabled="true" UserRights="EmptyMask"/> </ConsoleNode> <ConsoleNode Action="cms:ManageSiteAction" DisplayText="cms,siteactions_managecontentandstructure_displaytext" Description="cms,siteactions_managecontentandstructure_description" UseResourceFile="true" MenuGroupId="300" Sequence="370" UIVersion="3" PermissionContext="CurrentSite" ImageUrl="/_layouts/images/smt_small.png" ID="wsaManageSite"/> <ConsoleNode Action="cms:ManageSiteAction" DisplayText="cms,siteactions_managecontentandstructure_displaytext" Description="cms,siteactions_managecontentandstructure_description" UseResourceFile="true" MenuGroupId="300" Sequence="301" UIVersion="4" PermissionContext="CurrentSite" ImageUrl="/_layouts/images/smt_small.png" ID="wsaManageSiteUIVersion4"/> </structure> </Console>