How can I disable SharePoint page personalization? (Continued)

Source: Internet
Author: User

In the previous article, I wrote a method to disable the personalization of SharePoint pages. But some people asked, What should I do if I only want the Administrator to personalize the page, but not the Administrator to do this? The following is the method. Note: This method is based on how SharePoint displays its "website operations" menu principle. That is to say, this method is based on its principle of "Inverted inference ", I have not performed a complete verification test on this method... :(

First, the master page of WSS 3.0 uses one of the following two methods to display the "website operations" menu in the upper-right corner of the page.

1. directly use the "Microsoft. Sharepoint. webcontrols. siteactions" control on the master page. For example, default. Master is like this:

2. Alternatively, use "Program Files \ common files \ microsoft shared \ Web Server Extensions \ 12 \ template \ controltemplates \ publishingactionmenu. ascx (of course, this user control actually uses Microsoft. sharepoint. webcontrols. siteactions ). For example, blueband. Master:

Therefore, the following steps determine whether to directly modify the master page file or the user control based on the master page you are using. The following example uses default. Master, which is the first case.

The siteactions control is used as a nested control, similar:

<Siteactions>
<Customtemplate>
<Featuremenutemplate>
<Menuitemtemplate/> <--- each "menuitemtemplate" indicates a project in the website operation menu.
</Featuremenutemplate>
</Customtemplate>
</Siteactions>

Find the "<menuitemtemplate>" Node indicating "Edit page, the value of "permissionsstring" and "permissionmode" ("permissionsstring" indicates that only users with this permission can use this menu item. "fullmask" indicates all permissions, "manageweb" indicates managing the current website ):

Well, it's not over yet. Open "Program Files \ common files \ microsoft shared \ Web Server Extensions \ 12 \ template \ layouts \ editingmenu \ siteaction. in the XML file, find the consolenode node whose ID is "wsaeditpage" and add the "userrights" attribute. (Why do we need to do this? Simply put, Sharepoint uses Microsoft. sharepoint. publishing. webcontrols. publishingsiteactionsmenucustomizer control to read the XML file, and then dynamically change the "website operations" menu .)

OK, complete. Theoretically, this method can be solved in a more "elegant" coding method, and then encapsulated into a solution package,... sometimes it is easier to solve problems quickly, isn't it? In addition, I believe that you can learn more from this blog, except to disable page personalization...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.