IMetabaseObjectSecurity.GetAccessSecurity

Syntax

GetAccessSecurity(Options: Integer): IAccessObjectSecurity;

GetAccessSecurity(System.Int32): Prognoz.Platform.Interop.Metabase.IAccessObjectSecurity;

Parameters

Options. The parameter is not used, it is reserved for the future. To enable method work, set any value.

Description

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

Example

To execute the example, make sure that the repository contains an MDM repository with the RDSBASE identifier and a table MDM dictionary with the Dict_1 identifier. The user who executes the example must have the Changing Security Label and Access Control List of Any Object privilege.

To execute the example, add a link to the Metabase system assembly.

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;

Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Object: IMetabaseObjectDescriptor;
    MS: IMetabaseObjectSecurity;
    AOS: IAccessObjectSecurity;
Begin
    MB := Params.Metabase;
    Object := MB.ItemByIdNamespace[
"Dict_1", MB.ItemById["RDSBASE"].Key];
    MS := Object 
As IMetabaseObjectSecurity;
    System.Diagnostics.Debug.WriteLine(MS.AccessSecured.ToString());
    
If MS.AccessSecured Then
        AOS := MS.GetAccessSecurity(
1);
        AOS.RevokeAccessSecured();
    
End If;
End Sub;

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

See also:

IMetabaseObjectSecurity