SetPermissions

The SetPermissions method of the Role interface sets role permissions for a given key.

Applies To
clsCubeRole  

Syntax

bRet = object.SetPermissions(key,PermissionExpression)

bRet
A Boolean variable that receives the completion status of the operation: True if it was completed successfully, False otherwise.
object
The role object on which to set permissions.
key
String containing the permission key.
PermissionExpression
String containing the permission expression for the corresponding key.
Remarks

The Permissions property contains only one permissions key. It is preset with a value of Access. The PermissionExpression for the access key contains the property values R and RW, corresponding to read-only and read/write.

Example

Use the following code to set permissions on an object of ClassType clsCubeRole.

'Assume an object (dsoCubeRole) of ClassType clsCubeRole exists

'Set a read-only permission

dsoCubeRole.SetPermissions "Access", "R"

'Set a read-write permission

dsoCubeRole.SetPermissions "Access", "RW"

See Also
About Decision Support Objects Using Decision Support Objects
Methods Cross-Reference  

(c) 1988-1998 Microsoft Corporation. All Rights Reserved.