AddGroupUsers(Value: IMetabaseGroup; UpdateType: MetabaseSecuritySubjectUpdateType);
AddGroupUsers(Value: Prognoz.Platform.Interop.Metabase.IMetabaseGroup; UpdateType: Prognoz.Platform.Interop.Metabase.MetabaseSecuritySubjectUpdateType);
Value. Group of users.
UpdateType. Type of update.
The AddGroupUsers method contains all users of a group into a list for update.
A group of users, created in the repository or the domain group of users can be specified as the group.
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.
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: