Determines whether the user has the specified permissions for the indicated class, and gets the current permissions. Namespace: Microsoft.ConfigurationManagement.AdminConsole
Assembly: Microsoft.ConfigurationManagement.ManagementProvider (in microsoft.configurationmanagement.managementprovider.dll)

Usage

Visual Basic
Dim connectionManager As ConnectionManagerBase
Dim objectName As String
Dim permissions As Integer
Dim currentPermissions As Integer
Dim returnValue As Boolean

returnValue = ResultObjectHelpers.UserHasPermissions(connectionManager, objectName, permissions, currentPermissions)

Syntax

Visual Basic
Public Shared Function UserHasPermissions ( _
		connectionManager As ConnectionManagerBase, _
		objectName As String, _
		permissions As Integer, _
		<OutAttribute> ByRef currentPermissions As Integer _
) As Boolean
C#
public static bool UserHasPermissions (
		ConnectionManagerBase connectionManager,
		string objectName,
		int permissions,
		out int currentPermissions
)
C++
public:
static bool UserHasPermissions (
		ConnectionManagerBase^ connectionManager, 
		String^ objectName, 
		int permissions, 
		[OutAttribute] int% currentPermissions
)
J#
public static boolean UserHasPermissions (
		ConnectionManagerBase connectionManager, 
		String objectName, 
		int permissions, 
		/** @attribute OutAttribute() */ /** @ref */ int currentPermissions
)
JScript

Parameters

connectionManager

[in] ConnectionManagerBase object.

objectName

[in] Name of the class.

permissions

[in] Permission value. Possible values are defined by UserClassPermissions.

currentPermissions

[out] Current permission value for the user.

Return Value

true if the user has the specified permissions; otherwise false.

Remarks

Exception type

Condition

ArgumentNullException

The connectionManager parameter cannot be null.

ArgumentException

The objectName parameter cannot be null or an empty string.


Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Server 2003, Windows Vista

Target Platforms

Windows Server 2003,Windows Vista

See Also

Reference

ResultObjectHelpers Class
ResultObjectHelpers Members
Microsoft.ConfigurationManagement.AdminConsole Namespace
ConnectionManagerBase
T T:Microsoft.ConfigurationManagement.ManagementProvider.UserClassPermissions