Share via


SPCapabilityChecker.CheckUsageRightForCurrentUser method

Checks the user license and gets the display names of the services or features for which the current user does not have a license. If the user has the license to use all services or features of this capability, an empty list is returned.

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

Syntax

'Declaration
Public Overridable Function CheckUsageRightForCurrentUser ( _
    hostWeb As SPWeb _
) As IEnumerable(Of String)
'Usage
Dim instance As SPCapabilityChecker
Dim hostWeb As SPWeb
Dim returnValue As IEnumerable(Of String)

returnValue = instance.CheckUsageRightForCurrentUser(hostWeb)
public virtual IEnumerable<string> CheckUsageRightForCurrentUser(
    SPWeb hostWeb
)

Parameters

Return value

Type: System.Collections.Generic.IEnumerable<String>
The display names of the capabilities for which the current user does not have a license.

See also

Reference

SPCapabilityChecker class

SPCapabilityChecker members

Microsoft.SharePoint namespace