Groups: IMetabaseGroups;
The Groups property returns the collection of groups of users used in security policy.
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.
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: