IMetabaseSecurityClassAttributes.ClassId

Syntax

ClassId: Integer;

Description

The ClassId property returns object type identifier.

Comments

The property is read-only and is used by the methods IMetabaseSecurityClassesAttributes.Add, IMetabaseSecurityClassesAttributes.FindByClass, IMetabaseSecurityClassesAttributes.RemoveByClass.

An object type identifier is also contained in the MetabaseObjectClass enumeration.

Example

To execute the example, make sure that attributes are contained for at least one object type.

Add links to the ABAC and Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    Lic: Object;
    Attrs: IMetabaseSecurityObjectsAttributes;
    ClassAttrs: IMetabaseSecurityClassAttributes;
    Id: Integer;
Begin
    MB := MetabaseClass.Active;
    // Get license to be able to work with the security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    // Delete object type attributes
    Attrs := MS.Policy.ObjectsAttributes;
    ClassAttrs := Attrs.Classes.Item(0); // determine object type by index, for which there are attributes
    Id := ClassAttrs.ClassId; // determine identifier of this object type
    Attrs.Classes.RemoveByClass(Id);
    // Save changes in security manager
    MS.Apply;
    // Check in license
    Lic := Null;
End Sub UserProc;

After executing the example the object type attributes with the 0 index are deleted.

See also:

IMetabaseSecurityClassAttributes