ISecuritySubjectsSearch.NameCriteria

Syntax

NameCriteria: String;

Description

The NameCriteria property determines a name of the desired security subject.

Comments

The following can be specified as value of the property:

The template enables using the substitute character *, that means that zero or more symbols can coincide, for example, "User*".

If requirement to specify domain or domain controller is set in the DomainSelectCriteria property, value for NameCriteria is set in one of the following formats:

Example

Sub SubjectsSearch;
Var
    MB: IMetabase;
    Search: ISecuritySubjectsSearch;
    Subjects: ISecuritySubjects;
    Subject: ISecuritySubject;
Begin
    MB := MetabaseClass.Active;
    Search := MB.Security.NewSubjectsSearch;
    Search.NameCriteria := "Ar*";
    Search.SubjectCriteria(SecuritySubjectType.User) := True;
    Search.SubjectCriteria(SecuritySubjectType.Group) := True;
    Search.AreaIncludeDB := True;
    Search.AreaIncludeNT := True;
    Search.ExecuteSearch;
    Subjects := Search.Subjects;
    If Subjects.Count > 0 Then
        For Each Subject In Subjects Do
            Debug.WriteLine(Subject.Name + ": " + Subject.Description);
        End For;
    End If;
End Sub SubjectsSearch;

Security subjects - users and groups among domain subjects and DBMS subjects - are searches for when executing the example. Names and description of the found subjects are displayed in the console window.

See also:

ISecuritySubjectsSearch