IMetabaseSecurity.AllGroups

Syntax

AllGroups: ISecuritySubjects;

AllGroups: Prognoz.Platform.Interop.Metabase.ISecuritySubjects;

Description

The AllGroups property returns the collection of all groups of users available in the repository.

Comments

This collection includes all users groups, created in the current repository, as well as all domain users groups.

Example

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    Groups: ISecuritySubjects;
    Group: ISecuritySubject;
Begin
    MB := MetabaseClass.Active;
    MS := MB.Security;
    
// Get a list of groups of users
    Groups := MS.AllGroups;
    Debug.WriteLine(
"List of groups of users: ");
    
For Each Group In Groups Do
        Debug.WriteLine(Group.Name);
    
End For;
End Sub UserProc;

Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    Groups: ISecuritySubjects;
    Group: ISecuritySubject;
Begin
    MB := Params.Metabase;
    MS := MB.Security;
    
// Get a list of groups of users
    Groups := MS.AllGroups;
    System.Diagnostics.Debug.WriteLine(
"List of groups of users: ");
    
For Each Group In Groups Do
        System.Diagnostics.Debug.WriteLine(Group.Name);
    
End For;
End Sub;

After executing the example, the console displays the list of all groups of users that are available in the current repository.

See also:

IMetabaseSecurity