IMetabaseUsersUpdate.AddGroupUsers

Syntax

AddGroupUsers(Value: IMetabaseGroup; UpdateType: MetabaseSecuritySubjectUpdateType);

Parameters

Value. User group;

UpdateType. Update type.

Description

The AddGroupUsers method includes all users of a group in update list.

Comments

A user group created in the repository or the domain user group can be specified as a group.

Example

To execute the example, make sure that the security manager contains a user group named TEST_GROUP.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    Lic: Object;
    UsUp: IMetabaseUsersUpdate;
    Gr: IMetabaseGroup;
Begin
    MB := MetabaseClass.Active;
    // Get license to work with the security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    // Create an update
    UsUp := MS.CreateUsersUpdate;
    Gr := MS.ResolveName("TEST_GROUP"As IMetabaseGroup;
    UsUp.AddGroupUsers(Gr, MetabaseSecuritySubjectUpdateType.DBGrant);
    // Update group members
    MS.UpdateUsers(UsUp);
    // Save changes
    MS.Apply;
    // Check in license
    Lic := Null;
End Sub UserProc;

After executing the example all users of the specified user group are updated.

See also:

IMetabaseUsersUpdate