Tuesday, October 11, 2011

A Web Part or Web Form Control on this Page cannot be displayed or imported. You don't have Add and Customize Pages permissions required to perform this action

I encountered very strange error yesterday and I was very thrilled to find a solution to this problem in SharePoint 2010. 


 Scenario is even the user has contribute permission on a specific web part page and try to add web parts, then also user cannot add the web part. Use keep getting message which says “A Web Part or Web form control on this page cannot be displayed or imported. You don’t have add and customized pages permissions required to perform this action.


Now the other problem, when the same user tried to add some other web parts like list view web part, they were added on a page without giving this error. 


Now this is something new that I‘ve encountered. So I try giving user a full permission on that web part page. Still user was not able to add content editor web part to a page but was able to add list view web part. I didn’t realize what is wrong with SharePoint 2010. User has full control even though need not to for actions that user wants to perform, then also user is not able to add content editor web part. 


Then I started Google information and found that if the user does not have design permission on a site level which itself has one permission called “Add and Customize the page” then user cannot add certain web parts to a page. 


Once you give user design permission or Add and Customize page permission, user should be good to go for adding content editor web part to a page. This permission is given by default to Designer group and not to contributor group. This may be due to a security constrain where user can write cross site query scripting to manipulate something.


There is one more attribute that is new in SharePoint 2010 which allows or disallow a user which has contribute permission to add specific web part on a page.


If you set Safe=”false” a user with contribute permission cannot add this web part if it is set to true then it allows to be added on a page.


As you can see already many web parts have this property set to True. You can play around and check yourself. Hope you’ve liked this post.

5 comments:

praveen said...

goood

Panasaram007 said...

Good information

Tel@n said...

thanks

Tel@n said...

make SafeAgainstScript=True on safecontrol

Anderson said...

Another way of going about solving this - if you've upgraded from SP2007 and want it working like before - is to simply disable the added security and set "Allows contributors to add or edit scriptable Web Parts." in Central Administration. See http://sal-sharepoint2010.blogspot.dk/2010/05/full-control-user-cannot-edit-web-parts.html




Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com