IABACEvaluatedObject.GuidStr

Syntax

GuidStr: String;

Description

The GuidStr property enables the user to get unique identifier of element of the attribute-based access control structure.

Example

To execute the example, make sure that attribute-based access control contains a policies set with a nested policies set.

To execute the example, add links to the ABAC and Metabase system assemblies.

Sub Main;
Var
    PolicyObject: IABACRootPolicyObject;
    PolicySet, PolicySet2: IABACPolicySet;
    MB: IMetabase;
    MS: IMetabaseSecurity;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    // Get license to be able to work with the security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    PolicyObject := MB.Security.Policy.ABACRules;
    // Get the first policies set in attribute-based access control structure
    PolicySet := PolicyObject.Policies.Item(0);
    // Get the first policies set in the selected set
    PolicySet2 := PolicySet.PolicySets.Item(0);
    // Display unique identifier of policies set in the console
    Debug.WriteLine("Unique identifier (Guid): " + PolicySet2.GuidStr);
    Debug.WriteLine("Unique identifier (Guid): " + PolicySet2.GuidStr);
    // Check in license
    Lic := Null;
End Sub Main;

After executing the example the console displays unique identifiers of policies sets of attribute-based access control structure as a string:

Unique identifier (Guid): {31C234D0-73CB-4223-8829-AA8C58C2D0AD}

Unique identifier (Guid): {C49B51FD-DE78-4E64-9C0E-3C8C8336CE15}

See also:

IABACEvaluatedObject