ISecurityDescriptor.AccessToken

Syntax

AccessToken: IAccessToken;

Description

The AccessToken property returns parameters of the mandatory access control to the object.

It is relevant if the mandatory access control to the objects is active.

Example

Executing the example requires that the repository contains an object with the Obj_1 identifier. The mandatory access control to the objects was activated in the repository.

Sub Main;

Var

MB: IMetabase;

SDesc: ISecurityDescriptor;

Tok: IAccessToken;

SecCat: ISecurityCategory;

SecLevel: ISecurityLevel;

Begin

MB := MetabaseClass.Active;

SDesc := MB.ItemById("Obj_1").SecurityDescriptor;

SDesc.Edit;

Tok := SDesc.AccessToken;

SecCat := MB.Security.Policy.MandatoryAccess.Category(0);

SecLevel := SecCat.Level(2);

Tok.ClassificationLabel(SecCat) := SecLevel;

SDesc.Apply(False);

End Sub Main;

After executing this example the mandatory access parameters of the specified object is changed. The third level of access is set for the first category.

See also:

ISecurityDescriptor