GetAccessSecurity(Options: Integer): IAccessObjectSecurity;
Options - parameter is not used. Reserved for the future. Any value should be passed for the work of this method at the given moment.
The GetAccessSecurity method gets the policy of access to the object. Receive of the users/groups, access elements and rights by elements is meant.
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;
MS : IMetabaseObjectSecurity;
AOS : IAccessObjectSecurity;
Begin
MB := MetabaseClass.Active;
Object := MB.ItemByIdNamespace("Dict_1", MB.ItemById("RDSBASE").Key);
MS := Object As IMetabaseObjectSecurity;
Debug.WriteLine(MS.AccessSecured.ToString);
If MS.AccessSecured Then
AOS := MS.GetAccessSecurity(1);
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: