Thursday, November 30, 2017

AllowAnonymousAccess, AnonymousState and AnonymousPermMask64 properties for Sharepoint sites with different anonymous configurations

In Sharepoint it is possible to use several anonymous configurations for the sites. They may be changed from Site settings > Site permissions > Anonymous access:

  • Entire Web site
  • Lists and libraries
  • Nothing

Here what description says about them:

Specify what parts of your Web site (if any) anonymous users can access. If you select Entire Web site, anonymous users will be able to view all pages in your Web site and view all lists and items which inherit permissions from the Web site. If you select Lists and libraries, anonymous users will be able to view and change items only for those lists and libraries that have enabled permissions for anonymous users.

And Nothing means that site doesn’t have anonymous access. Depending on used setting Sharepoint changes 3 properties of corresponding SPWeb object: AllowAnonymousAccess, AnonymousState and AnonymousPermMask64. Let’s see how they are changed depending on selection:

1. Anonymous users can access: Entire Web site

Property Value
AllowAnonymousAccess True
AnonymousState On
AnonymousPermMask64 ViewListItems, ViewVersions, ViewFormPages, Open, ViewPages, UseClientIntegration

2. Anonymous users can access: Lists and libraries

Property Value
AllowAnonymousAccess False
AnonymousState Enabled
AnonymousPermMask64 Open

2. Anonymous users can access: Nothing

Property Value
AllowAnonymousAccess False
AnonymousState Disabled
AnonymousPermMask64 EmptyMask

No comments:

Post a Comment