GetAllMembers: ISecuritySubjects;
The GetAllMembers method returns all security subjects included in the user group.
The method can be called only for user groups. When the method is called for the user, an exception is thrown. When the method is called for the domain user group, the system addresses the domain controller to get the required information.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
Mb: IMetabase;
MbSec: IMetabaseSecurity;
Subject: ISecuritySubject;
Subjects: ISecuritySubjects;
i, j: Integer;
Begin
Mb := MetabaseClass.Active;
MbSec := Mb.Security;
Subject := MbSec.ResolveName("ADMINISTRATORS");
Subjects := Subject.GetAllMembers;
j := Subjects.Count;
For i := 0 To j - 1 Do
Debug.WriteLine(Subjects.Item(i).Name);
End For;
End Sub UserProc;
After executing the example the development environment console displays the list of security subjects included in the group of administrators.
See also: