SubjectCriteria(Type: SecuritySubjectType): Boolean;
Type. A security subject type.
The SubjectCriteria property determines types of the security subjects that need to be found.
Sub Main;
Var
MB: IMetabase;
Sea: ISecuritySubjectsSearch;
Subjs: ISecuritySubjects;
Subj: ISecuritySubject;
i: integer;
Begin
MB := MetabaseClass.Active;
Sea := MB.Security.NewSubjectsSearch;
Sea.NameCriteria := "Ap*";
Sea.SubjectCriteria(SecuritySubjectType.User) := True;
Sea.SubjectCriteria(SecuritySubjectType.Group) := True;
Sea.AreaIncludeDB := True;
Sea.AreaIncludeNT := True;
Sea.ExecuteSearch;
Subjs := Sea.Subjects;
If Subjs.Count > 0 Then
For i := 0 To Subjs.Count - 1 Do
Subj := Subjs.Item(i);
Debug.WriteLine(Subj.Name + ": " + Subj.Description);
End For;
End If;
End Sub Main;
Security subjects - users and groups among domain subjects and DBMS subjects - are searches for when executing the example. Name and description of the found subjects are displayed in the console window.
See also: