AllGroups: ISecuritySubjects;
The AllGroups property returns collection of all users groups, available in the current repository.
This collection includes all users groups, created in the current repository, as well as all domain users groups.
To execute the 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 current repository.
See also: