IMetabaseSecurity.ActiveUsers

Syntax

ActiveUsers: IMetabaseUsers;

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.

Example

To execute the example, add a link to the Metabase system assembly.

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;

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;

After executing the example, the console will display a list of repository users. The list contains all users available in security manager and users satisfying the conditions:

See also:

IMetabaseSecurity