IMetabasePolicy.MethodsCombineAlgorithm

Syntax

MethodsCombineAlgorithm: ControlMethodsCombineAlgorithm;

MethodsCombineAlgorithm: Prognoz.Platform.Interop.Metabase.ControlMethodsCombineAlgorithm;

Description

The MethodsCombineAlgorithm property determines permission combination algorithm by attribute-based and discretionary access control method.

Comments

The property is relevant if attribute-based and discretionary access control methods are used simultaneously.

Example

To execute the example, add links to the Metabase, ForeSystem (for the Fore.NET example) system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    
// Get license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    
// Activate the use of discretionary and attribute-based access control
    MS.Policy.DiscretionaryAccessControl := True;
    MS.Policy.AttributeBasedAccessControl := 
True;
    
// Install the OR combination algorithm
    MS.Policy.MethodsCombineAlgorithm := ControlMethodsCombineAlgorithm.Permit;
    
// Save changes
    MS.Apply;
    
// Check in license
    Lic := Null;
End Sub UserProc;

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.ForeSystem;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    Lic: Object;
Begin
    MB := Params.Metabase;
    
// Get license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.lftAdm);
    MS := MB.Security;
    
// Activate the use of discretionary and attribute-based access control
    MS.Policy.DiscretionaryAccessControl := True;
    MS.Policy.AttributeBasedAccessControl := 
True;
    
// Install the OR combination algorithm
    MS.Policy.MethodsCombineAlgorithm := ControlMethodsCombineAlgorithm.cmcaPermit;
    
// Save changes
    MS.Apply();
    
// Check in license
    Lic := Null;
End Sub;

After executing the example the use of discretionary and attribute-based access control methods will be activated and the OR permission combination algorithm is set.

When the combination algorithm is set:

See also:

IMetabasePolicy