IMetabaseUsersUpdate.AddGroupUsers

Syntax

AddGroupUsers(Value: IMetabaseGroup; UpdateType: MetabaseSecuritySubjectUpdateType);

Parameters

Value. Group of users;

UpdateType. Update type.

Description

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

Comments

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

Example

To execute the example, make sure that the security manager contains a group of users 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;
    
// Check out license to work with 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 group named Test Group are updated.

See also:

IMetabaseUsersUpdate