IMetabaseSecurity.AllUsers

Syntax

AllUsers: ISecuritySubjects;

Description

The AllUsers property returns the collection of all users available in the current repository.

Comments

This collection includes all users who can be used on working in the repository:

NOTE. In Windows OS, domain users are also included in the collection. The users with the attribute of lazy loading will have only the basic description available (name, security subject type and security descriptor). To get all custom parameters, use the IMetabaseSecurity.ResolveName, IMetabaseSecurity.ResolveSid methods or search via IMetabaseSecurity.NewSubjectsSearch.

Example

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    Users: ISecuritySubjects;
    User: ISecuritySubject;
Begin
    MB := MetabaseClass.Active;
    MS := MB.Security;
    // Get list of users
    Users := MS.AllUsers;
    Debug.WriteLine("List of users (" + Users.Count.ToString + "):");
    For Each User In Users Do
        Debug.WriteLine(User.Name);
    End For;
End Sub UserProc;

After executing the example the development environment console displays the list of all users available in the current repository.

See also:

IMetabaseSecurity