AllGroups: ISecuritySubjects;
The AllGroups property returns the collection of all groups of users available in the repository.
This collection includes all groups of users created in the current repository.
NOTE. In Windows OS, domain groups of users are also included in the collection.
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 list of groups of users
Groups := MS.AllGroups;
Debug.WriteLine("List of groups of users (" + Groups.Count.ToString + "):");
For Each Group In Groups Do
Debug.WriteLine(Group.Name);
End For;
End Sub UserProc;
After executing the example the console displays the list of all groups of users available in the current repository.
See also: