SiteAccessChecker(Microsoft.SharePoint.Portal.PortalContext, Microsoft.SharePoint.Portal.Security.PortalRight) Constructor

The SiteAccessChecker constructor initializes a new instance of the SiteAccessChecker class.

Parameters

ctx A Microsoft.SharePoint.Portal.PortalContext object that represents the current portal site.

rights A Microsoft.SharePoint.Portal.Security.PortalRight value that specifies the rights on the site. This parameter can take both site and area rights.

Example

The following example shows how to create a SiteAccessChecker object and use its methods. The DemandSiteRightByName method will throw an exception if the specified user ("Dan Wilson") does not have the specified right (Create Category) on the portal site.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security