IMetabaseSecurity.ActiveUsers

Fore Syntax

ActiveUsers: IMetabaseUsers;

Fore.NET Syntax

ActiveUsers: Prognoz.Platform.Interop.Metabase.IMetabaseUsers;

Description

The ActiveUsers method returns the collection of users, created in the current repository considering users with the deferred loading of descriptions.

Comments

On logging in the repository the description of the users created in the security manager are loaded. Their descriptions can be obtained in the Users property. The ActiveUsers method enables the possibility to get all users of the repository: users added in the security manager and users, created in the DBMS, added to the repository and having the attribute of the deferred loading of the description.

NOTE. The method returns only users with the deferred loading of the description, which are also the DBMS users.

Fore Example

Sub UserProc;
Var
    MB: IMetabase;
    Sec: IMetabaseSecurity;
    Users: IMetabaseUsers;
    User: IMetabaseUser;
Begin
    MB := MetabaseClass.Active;
    Sec := MB.Security;
    Users := Sec.ActiveUsers;
    For Each User In Users Do
        Debug.WriteLine(User.Name + ": " + User.IsDeferred.ToString);
    End For;
End Sub UserProc;

On executing the example the list of the repository users will be output to the development environment console. The list includes all users available in the repository manager and users created in the DBMS, added to the repository and for which the attribute of the deferred loading of the description is set.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Sec: IMetabaseSecurity;
    Users: IMetabaseUsers;
    User: IMetabaseUser;
Begin
    MB := Params.Metabase;
    Sec := MB.Security;
    Users := Sec.ActiveUsers();
    For Each User In Users Do
        System.Diagnostics.Debug.WriteLine(User.Name + ": " + User.IsDeferred.ToString());
    End For;
End Sub;

See also:

IMetabaseSecurity