Roles Object

The Roles object manages security roles for folders. The scope of the roles is determined by its parent folder.

ClosedRoles Object Properties

The Roles object provides the following properties, some of which are read-only. To affect some read-only properties requires user interaction or custom event procedures that use other Roles properties or methods.

ClosedAssignments Property

Gets the names of users and groups that have been assigned to roles for the current Folder object.

Syntax

Assignments As Variant

Remarks

Returns an array of subarrays. Each subarray contains the name of the user or group and its corresponding role name.

ClosedInheritedFromParent Property

Gets or sets whether the current Folder object inherits its role assignments from its parent object.

Syntax

InheritedFromParent As Boolean

Remarks

This property is set to False by the AddAssignment, Clear, and DeleteAssignment methods.

ClosedRoles Object Methods

The Roles object methods affect the current Folder object.

ClosedAddAssignment Method

Adds a role assignment to the current Folder object.

Syntax

AddAssignment (Assignee As String, Role As String)
Parameters
Name Description

Assignee

User or group name to assign the role to.

Role

Role name to assign to Assignee.

Remarks

This method sets the InheritedFromParent property to False.

ClosedClear Method

Removes all existing role assignments from the current Folder object.

Syntax

Clear

Parameters

This method accepts no parameters.

Remarks

This method sets the InheritedFromParent property to False.

ClosedDeleteAssignment Method

Removes a role assignment from the current Folder object.

Syntax

DeleteAssignment (Assignee As String, Role As String)
Parameters
Name Description

Assignee

User or group name to remove the role from.

Role

Role name to remove from Assignee.

Remarks

This method sets the InheritedFromParent property to False.

2023