Search in sources :

Example 16 with PermissionsOperationsParameters

use of org.ovirt.engine.core.common.action.PermissionsOperationsParameters in project ovirt-engine by oVirt.

the class AttachUserToVmFromPoolAndRunCommand method attachUserToVm.

private ActionReturnValue attachUserToVm() {
    Permission perm = new Permission(getAdUserId(), PredefinedRoles.ENGINE_USER.getId(), getVmId(), VdcObjectType.VM);
    PermissionsOperationsParameters permParams = new PermissionsOperationsParameters(perm);
    permParams.setShouldBeLogged(false);
    permParams.setParentCommand(getActionType());
    permParams.setParentParameters(getParameters());
    return runInternalAction(ActionType.AddPermission, permParams, cloneContext().withoutExecutionContext().withoutLock());
}
Also used : PermissionsOperationsParameters(org.ovirt.engine.core.common.action.PermissionsOperationsParameters) Permission(org.ovirt.engine.core.common.businessentities.Permission)

Aggregations

PermissionsOperationsParameters (org.ovirt.engine.core.common.action.PermissionsOperationsParameters)16 ArrayList (java.util.ArrayList)9 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)9 Permission (org.ovirt.engine.core.common.businessentities.Permission)8 DbGroup (org.ovirt.engine.core.common.businessentities.aaa.DbGroup)5 DbUser (org.ovirt.engine.core.common.businessentities.aaa.DbUser)5 ConfirmationModel (org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel)5 Role (org.ovirt.engine.core.common.businessentities.Role)3 Guid (org.ovirt.engine.core.compat.Guid)3 EntityModel (org.ovirt.engine.ui.uicommonweb.models.EntityModel)3 AdElementListModel (org.ovirt.engine.ui.uicommonweb.models.users.AdElementListModel)3