Managing User Access to SharePoint Web Parts

In SharePoint 2010, providing users have sufficient permissions, they can add various web parts available on the site. In larger organizations, various users have different skill levels and although some categories of users might be allowed to edit the page – you might want to restrict who can add which web parts to the page.

Uploading SharePoint Web Part Definition

Uploading SharePoint Web Part Definition

Let’s say we want to restrict Content Editor web part from being added by a specific user or group of users. Let’s see what’s involved:

1. As an administrator of the site, in my case http://intranet.contoso.com, log into the web part gallery: http://intranet.contoso.com/_catalogs/wp/

2. Locate the web part you want to restrict, in my case Content Editor and access the permission management page for the web part as shown below:

Editing Content Editor Web Part

Editing Content Editor Web Part

3. By default, all of the web part definition files inherit the permissions from the parent web. Click Stop Inheriting to define unique permissions applicable to your case.

4. Since in our case, we explicitly removed one of the users from accessing the Content Editor web part in web part gallery, let’s see how his view changes with this new setting: Sure enough, the user is now not able to add the web part to the page.

User Access

Content Editor Web Part – Restricted Access

Remember, this trick does not apply to web parts that have been already added to the site. In other words, you can’t choose to disallow a particular group of users to view the web part already added to the site. The reason being is that web part definition file is used only once when the web part is added to the page. This web part definition XML initializes default properties that will be set to the instance of the web part. Once the web part is added to the page, the definition XML resides within a page along with properties you might have tweaked after you added the web part.

User Access

Alerts on Web Part

If you’re an administrator and would like to keep a better track of who is uploading which web parts to your site without necessarily restricting it – you can set up an alert on your web part gallery and receive a summary of activity on the site:

Enjoy!

This article was originally posted on ShareMuch.

Stay tuned for more SharePoint content by joining our community or by following us on twitter or facebook.

Share this on...

Rate this Post:

Share: