Web parts are the components of an organization's
site that provide modularity and flexibility. Web parts are ASP.NET
server-side modules that are available to be put into a page via a web
part zone. The modules perform all different kinds of functions based on
an organization's needs.
SharePoint 2010 Enterprise comes with 60+ web parts.
In addition, an organization can create their own web parts based on
business requirements.
There are two considerations to think about with regards to governance of web parts in the context of this recipe.
Getting ready
You must have farm-level administrative permissions to the Central Administration site.
How to do it...
Open up SharePoint 2010 Central Administration website.
Click Application Management. Under the section Web Applications, click Manage Web Applications.
The
available web applications will be listed. Click to the right of the
web application you wish to manage. The entire line will turn blue and
the ribbon will light up.
On the ribbon, there is a button called Web Part Security; click that. The following screenshot appears:
Web Part Connections: The strength of web part connections is that information from one web part can be passed to another web part.
Online Web Part Gallery: This is a web part gallery that is either available from Microsoft or one that has been created.
Scriptable Web Parts: This will
either allow or prevent contributors from adding scripts in a web part.
An example of this is JavaScript in a Content Editor web part. Retain
the default value.
Click OK.
How it works...
This recipe shows web part security at a web
application level. Everything shown applies to all site collections
under the web application. It works as a blanket policy. It is not web
part security at a granular level.
There's more...
There are times when an organization needs to expose
certain web parts to targeted users. Another way of saying this is
managing which web parts appear in the Web Part Gallery based on a
user's role.
The best way to do this is at a site collection level. You must be a Site Collection Administrator to do this.
Create
the necessary SharePoint groups and add the appropriate users. Creating
a matrix of groups and web parts will facilitate the actual assigning
of permissions.
Select Site Actions | Site Settings.
Under the section named Galleries, select Web Parts.
Choose the web part that you wish to change permissions on by clicking the edit icon.
The form that appears has a ribbon with a button called Manage Permissions.
Adjust the permissions to represent the organization's needs.