Поделиться через


RequestAccess Property

The RequestAccess property of the SPPermissionCollection class gets or sets a Boolean value that specifes whether request for access is enabled for a list.

Property Value

true if request for access is enabled for the list; otherwise, false.

Remarks

The RequestAccess property applies to the permissions for a single list, while the RequestAccessEmail property applies to the permissions for an entire site. If the RequestAccessEmail property contains an empty string, then request for access cannot be enabled for a list.

Example

The following code example enables request for access on a site, but removes request for access from all lists except the list with a specified title.

This example requires using directives (Imports in Visual Basic) for both the Microsoft.SharePoint and Microsoft.SharePoint.WebControls namespaces.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security