ISecurityDescriptor.AccessToken

Syntax

AccessToken: IAccessToken;

Description

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

Comments

The property is relevant if the mandatory access control to the objects is enabled.

Example

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

Sub UserProc;
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 UserProc;

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

See also:

ISecurityDescriptor