Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have an internet site using MOSS 2007/win 2008/SQL 2005. Users are authenticated using forms authentication.

All authenticated users are able to browse pages like: /Style%20Library/Forms/AllItems.aspx or _layouts/viewlsts.apsx

They can view XSL files and even download a copy of it.

How can I restrict users from accessing these pages without affecting their browsing experience?

Note: I have activated the ViewFormPagesLockdown feature and made sure anonymous users are not able to access these pages.

share|improve this question

1 Answer 1

As you say ViewFormPagesLockdown affects anonymous users only. What the feature really does is remove ViewFormPages right from Limited Access role:

SPRoleDefinition guest = mySite.RootWeb.RoleDefinitions.GetByType(SPRoleType.Guest);
guest.BasePermissions &= ~(SPBasePermissions.EmptyMask | SPBasePermissions.ViewFormPages);
guest.BasePermissions &= ~SPBasePermissions.UseRemoteAPIs;
guest.Update();

You could use the same code to remove these permissions for the role types you dont want this access to.

share|improve this answer
    
you mean i need to create an EXE for example that does this action and run it against the sites that need to be secured? –  Emad Mar 1 '10 at 11:44
    
i would probably go for a call-out (feature receiver) that modified the role. This gives you both better provisioning and the possibility to reset the rights on feature deactivation: guest.BasePermissions |= SPBasePermissions.EmptyMask | SPBasePermissions.ViewFormPages; guest.BasePermissions |= SPBasePermissions.UseRemoteAPIs; what you will need to determine first though is what SPRoleType you want to revoke these permissions from... –  Anders Rask Mar 1 '10 at 13:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.