IMetabaseObjectDescriptor.GetSecurity

Syntax

GetSecurity: IAccessObjectSecurity;

Description

The GetSecurity method gets the access policy of the object. Receive of the users/groups, access elements and rights by elements is meant.

Example

Executing the example requires that the scheme contains an MDM repository with the MDMBASE identifier and an MDM dictionary with the Dict_1 identifier. The "Change of the security label and of the access control list of any object" privilege should be given to the user who executes the example.

Sub UserProc;

Var

MB : IMetabase;

Object : IMetabaseObjectDescriptor;

SD : ISecurityDescriptor;

AOS : IAccessObjectSecurity;

Begin

MB := MetabaseClass.Active;

Object := MB.ItemByIdNamespace("Dict_1", MB.ItemById("RDSBASE").Key);

SD := Object.SecurityDescriptor;

If SD.AccessSecured Then

AOS := Object.GetSecurity;

AOS.RevokeAccessSecured;

End If;

End Sub UserProc;

After executing the example the use of the access permissions is disabled for the MDM dictionary, if it was enabled before.

See also:

IMetabaseObjectDescriptor