Sunday, August 19, 2012

Anonymous Access – Disable access to forms under lists and libraries in SharePoint 2010

Introduction


While doing some research on how to disable access to the application and from pages for anonymous users in SharePoint 2010, I came across an interesting feature, the “ViewFormPagesLockdown” feature. This feature when enabled will disallow anonymous users access to application and form pages (allitems.aspx, newforms.aspx etc.) while allowing access to read and download the content from the list and document libraries.


Feature availability


The feature is available in SharePoint 2007, SharePoint Foundation 2010 and SharePoint Server 2010 and not available in WSS. This feature is available on only those sites that have been created using the Publishing Portal template.


Usage


The feature is enabled by default on a site created using Publishing Portal template. This is a hidden feature and can only be enabled or disabled using STSADM tool in SharePoint 2007 and PowerShell in SharePoint 2010.


SharePoint 2010


To enable the feature run the following command


Enable-SPFeature –identity "feature name" -URL http://site
Note – You can use the GUID instead of feature name as well.


To disable the feature


It’s a 2 step process to disable the feature
  1. Get the feature object in a variable using the following command
$feature = get-spfeature viewformpageslockdown
  1. Run the disable feature command
disable-spfeature $feature -url http://site


SharePoint 2007


To enable the feature run the following stsadm command


stsadm -o activatefeature -url "site url" -filename ViewFormPagesLockDown\feature.xml

To disable the feature run the following stsadm command


stsadm -o deactivatefeature -url "site url" -filename ViewFormPagesLockDown\feature.xml

For more information please refer to the following links

SharePoint 2010

SharePoint 2007











2 comments:

  1. Thanks! My only experience with this usage is if I would want to allow annonymous access to a survey. Then the 'allow annonymous access' has to be turned on - this applies to the entire application, not just Site Collection, correct?

    ReplyDelete
    Replies
    1. Yes, you are right this applies to entire application.

      Delete