ResultObjectHelpers.UserHasPermissions Method (ConnectionManagerBase, String, Int32, out Int32)
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
'Usage
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
'Declaration
Public Shared Function UserHasPermissions ( _
connectionManager As ConnectionManagerBase, _
objectName As String, _
permissions As Integer, _
<OutAttribute> ByRef currentPermissions As Integer _
) As Boolean
public static bool UserHasPermissions (
ConnectionManagerBase connectionManager,
string objectName,
int permissions,
out int currentPermissions
)
public:
static bool UserHasPermissions (
ConnectionManagerBase^ connectionManager,
String^ objectName,
int permissions,
[OutAttribute] int% currentPermissions
)
public static boolean UserHasPermissions (
ConnectionManagerBase connectionManager,
String objectName,
int permissions,
/** @attribute OutAttribute() */ /** @ref */ int currentPermissions
)
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 |
---|---|
The connectionManager parameter cannot be null. |
|
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