Share via


SPObjectSharingInformation.GetWebSharingInformation method

Retrieves information about the sharing state for the current site. The current site is the site in the context of which this method is invoked.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Function GetWebSharingInformation ( _
    excludeCurrentUser As Boolean, _
    excludeSiteAdmin As Boolean, _
    excludeSecurityGroups As Boolean, _
    retrieveAnonymousLinks As Boolean, _
    retrieveUserInfoDetails As Boolean, _
    checkForAccessRequests As Boolean _
) As SPObjectSharingInformation
'Usage
Dim excludeCurrentUser As Boolean
Dim excludeSiteAdmin As Boolean
Dim excludeSecurityGroups As Boolean
Dim retrieveAnonymousLinks As Boolean
Dim retrieveUserInfoDetails As Boolean
Dim checkForAccessRequests As Boolean
Dim returnValue As SPObjectSharingInformation

returnValue = SPObjectSharingInformation.GetWebSharingInformation(excludeCurrentUser, _
    excludeSiteAdmin, excludeSecurityGroups, _
    retrieveAnonymousLinks, retrieveUserInfoDetails, _
    checkForAccessRequests)
public static SPObjectSharingInformation GetWebSharingInformation(
    bool excludeCurrentUser,
    bool excludeSiteAdmin,
    bool excludeSecurityGroups,
    bool retrieveAnonymousLinks,
    bool retrieveUserInfoDetails,
    bool checkForAccessRequests
)

Parameters

  • excludeCurrentUser
    Type: System.Boolean

    Specifies whether the returned sharing state information will exclude information about the user making the request.

  • excludeSiteAdmin
    Type: System.Boolean

    Specifies whether the returned sharing state information will exclude information about users who are site collection administrators of the site collection that contains the current site.

  • excludeSecurityGroups
    Type: System.Boolean

    Specifies whether the returned sharing state information will exclude information about security groups that have permissions to the current site.

  • retrieveAnonymousLinks
    Type: System.Boolean

    This parameter is ignored by the method.

  • retrieveUserInfoDetails
    Type: System.Boolean

    Specifies whether the returned sharing state information will contain basic or detailed information about the users with permissions to the current site.

  • checkForAccessRequests
    Type: System.Boolean

    Specifies whether the returned sharing state information will contain a URL to a location that describes any access requests present in the current site, if such a URL is available.

Return value

Type: Microsoft.SharePoint.SPObjectSharingInformation
An object that contains information about the sharing state for the current site.

See also

Reference

SPObjectSharingInformation class

SPObjectSharingInformation members

Microsoft.SharePoint namespace