IMetabaseUsersUpdate.AddGroupUsers

Fore Syntax

AddGroupUsers(Value: IMetabaseGroup; UpdateType: MetabaseSecuritySubjectUpdateType);

Fore.NET Syntax

AddGroupUsers(Value: Prognoz.Platform.Interop.Metabase.IMetabaseGroup; UpdateType: Prognoz.Platform.Interop.Metabase.MetabaseSecuritySubjectUpdateType);

Parameters

Value. Group of users.

UpdateType. Type of update.

Description

The AddGroupUsers method contains all users of a group into a list for update.

Comments

A group of users, created in the repository or the domain group of users can be specified as the group.

Fore Example

To execute the example, add the Metabase system assembly to the module. In Foresight Analytics Platform, a group of users named "Test group" must be created.

Sub UserProc;
Var
    Sec: IMetabaseSecurity;
    UsUp: IMetabaseUsersUpdate;
    Gr: IMetabaseGroup;
Begin
    Sec := MetabaseClass.Active.Security;
    UsUp := Sec.CreateUsersUpdate;
    Gr := Sec.ResolveName("TEST GROUP"As IMetabaseGroup;
    UsUp.AddGroupUsers(Gr, MetabaseSecuritySubjectUpdateType.DBGrant);
    // Update
    Sec.UpdateUsers(UsUp);
End Sub UserProc;

After executing this example all users of a group are updated.

Fore.NET Example

In Foresight Analytics Platform, a group of users named "Test group" must be created. The specified procedure is an entry point for the .NET assembly.

Public Shared Sub Main(Params: StartParams);
Var
    Sec: IMetabaseSecurity;
    UsUp: IMetabaseUsersUpdate;
    Gr: IMetabaseGroup;
Begin
    Sec := Params.Metabase.Security;
    UsUp := Sec.CreateUsersUpdate();
    Gr := Sec.ResolveName("TEST GROUP"As IMetabaseGroup;
    UsUp.AddGroupUsers(Gr, MetabaseSecuritySubjectUpdateType.mesesuuptyDBGrant);
    // Update
    Sec.UpdateUsers(UsUp);
End Sub;

After executing this example all users of a group are updated.

See also:

IMetabaseUsersUpdate