Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
SDK Documentation
SPSite Class
SPSite Methods
 DoesUserHavePermissions Method (SPR...
Community Content
In this section
Statistics Annotations (0)
Collapse All/Expand All Collapse All
This page is specific to
The 2007 product release

Other versions are also available for the following:
SPSite.DoesUserHavePermissions Method (SPReusableAcl, SPBasePermissions, SPWeb) (Microsoft.SharePoint)
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)
Visual Basic (Declaration)
Public Function DoesUserHavePermissions ( _
    acl As SPReusableAcl, _
    permissionMask As SPBasePermissions, _
    web As SPWeb _
) As Boolean
Visual Basic (Usage)
Dim instance As SPSite
Dim acl As SPReusableAcl
Dim permissionMask As SPBasePermissions
Dim web As SPWeb
Dim returnValue As Boolean

returnValue = instance.DoesUserHavePermissions(acl, permissionMask, web)
C#
public bool DoesUserHavePermissions (
    SPReusableAcl acl,
    SPBasePermissions permissionMask,
    SPWeb web
)

Parameters

acl

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

permissionMask

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

web

An SPWeb object that represents a SharePoint Web site.

Return Value

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, Windows SharePoint Services 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.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker