IMetabaseSecurity.Groups

Syntax

Groups: IMetabaseGroups;

Groups: Prognoz.Platform.Interop.Metabase.IMetabaseGroups;

Description

The Groups property returns the collection of groups of users used in security policy.

Comments

The Groups collection includes groups of users that are explicitly added in the security manager, and also hidden groups that are not added in the security manager but are used on granting access permissions to repository objects.

Example

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    Groups: IMetabaseGroups;
    Group: IMetabaseGroup;
Begin
    Groups := MetabaseClass.Active.Security.Groups;
    
For Each Group In Groups Do
        
If Not (Group.IsHidden And Group.IsNT) Then
            Debug.WriteLine(Group.Name);
        End If;
    
End For;
End Sub UserProc;

Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    Groups: IMetabaseGroups;
    Group: IMetabaseGroup;
Begin
    Groups := Params.Metabase.Security.Groups;
    
For Each Group In Groups Do
        
If Not (Group.IsHidden And Group.IsNT) Then
            System.Diagnostics.Debug.WriteLine(Group.Name);
        
End If;
    
End For;
End Sub;

After executing the example the development environment console displays the list of the groups of users that are added in the repository security manager.

See also:

IMetabaseSecurity