IMetabaseSecurity.AllUsers

Syntax

AllUsers: ISecuritySubjects;

AllUsers: Prognoz.Platform.Interop.Metabase.ISecuritySubjects;

Description

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

Comments

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

NOTE. For the users with the attribute if the deferred loading only the basic description will be available (name, security subject type and security descriptor). To obtain all custom parameters use IMetabaseSecurity.ResolveName, IMetabaseSecurity.ResolveSid methods or search via IMetabaseSecurity.NewSubjectsSearch.

Example

To execute the 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: ");
    
For Each User In Users Do
        Debug.WriteLine(User.Name);
    
End For;
End Sub UserProc;

Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    Users: ISecuritySubjects;
    User: ISecuritySubject;
Begin
    MB := Params.Metabase;
    MS := MB.Security;
    
// Get list of users
    Users := MS.AllUsers;
    System.Diagnostics.Debug.WriteLine(
"List of users: ");
    
For Each User In Users Do
        System.Diagnostics.Debug.WriteLine(User.Name);
    
End For;
End Sub;

After executing the example, the list of all users that are available in the current repository are displayed to the console.

See also:

IMetabaseSecurity