DoesUserHavePermissions Method (SPReusableAcl, SPBasePermissions, SPWeb)
Collapse the table of content
Expand the table of content

SPSite.DoesUserHavePermissions Method (SPReusableAcl, SPBasePermissions, SPWeb)

Returns a Boolean value that indicates whether the user has permissions for the specified Web site and set of rights.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.UnsupportedSPType)]
public bool DoesUserHavePermissions(
	SPReusableAcl acl,
	SPBasePermissions permissionMask,
	SPWeb web
)

Parameters

acl
Type: Microsoft.SharePoint.SPReusableAcl

An SPReusableAcl object that represents a reusable access control list (ACL).

permissionMask
Type: Microsoft.SharePoint.SPBasePermissions

An SPBasePermissions value that specifies base permissions for the site collection.

web
Type: Microsoft.SharePoint.SPWeb

An SPWeb object that represents a SharePoint Web site.

Return Value

Type: System.Boolean
true if the user has permissions for the specified set of rights; otherwise, false. The permissions are checked against the reusable ACL, and the results do not depend on the specified SPWeb object. If you do not specify an SPWeb object, SharePoint Foundation uses the root Web site in the site collection. If you already initialized an SPWeb object, specifying it can improve performance because you do not need to initialize the root Web site.
Show:
© 2016 Microsoft