use of org.ovirt.engine.core.bll.utils.PermissionSubject in project ovirt-engine by oVirt.
the class EndExternalStepCommand method getPermissionCheckSubjects.
@Override
public List<PermissionSubject> getPermissionCheckSubjects() {
List<PermissionSubject> permissionList = new ArrayList<>();
permissionList.add(new PermissionSubject(MultiLevelAdministrationHandler.SYSTEM_OBJECT_ID, VdcObjectType.System, ActionGroup.INJECT_EXTERNAL_TASKS));
return permissionList;
}
use of org.ovirt.engine.core.bll.utils.PermissionSubject in project ovirt-engine by oVirt.
the class UpdateVmTemplateCommand method getPermissionCheckSubjects.
@Override
public List<PermissionSubject> getPermissionCheckSubjects() {
final List<PermissionSubject> permissionList = super.getPermissionCheckSubjects();
if (getVmTemplate() != null && !isInstanceType() && !isBlankTemplate()) {
// host-specific parameters can be changed by administration role only
List<Guid> tmpltDdctHostsLst = getVmTemplate().getDedicatedVmForVdsList();
List<Guid> prmTmpltDdctHostsLst = getParameters().getVmTemplateData().getDedicatedVmForVdsList();
// tmpltDdctHostsLst.equals(prmTmpltDdctHostsLs is not good enough, lists order may change
if (!CollectionUtils.isEqualCollection(tmpltDdctHostsLst, prmTmpltDdctHostsLst)) {
permissionList.add(new PermissionSubject(getParameters().getVmTemplateId(), VdcObjectType.VmTemplate, ActionGroup.EDIT_ADMIN_TEMPLATE_PROPERTIES));
}
}
return permissionList;
}
use of org.ovirt.engine.core.bll.utils.PermissionSubject in project ovirt-engine by oVirt.
the class UpdateClusterCommand method getPermissionCheckSubjects.
@Override
public List<PermissionSubject> getPermissionCheckSubjects() {
final List<PermissionSubject> result = new ArrayList<>(super.getPermissionCheckSubjects());
final Guid macPoolId = getNewMacPoolId();
final boolean changingPoolDefinition = macPoolId != null && !macPoolId.equals(getOldMacPoolId());
if (changingPoolDefinition) {
result.add(new PermissionSubject(macPoolId, VdcObjectType.MacPool, ActionGroup.CONFIGURE_MAC_POOL));
}
return result;
}
use of org.ovirt.engine.core.bll.utils.PermissionSubject in project ovirt-engine by oVirt.
the class SetVmTicketCommand method getPermissionCheckSubjects.
@Override
public List<PermissionSubject> getPermissionCheckSubjects() {
final List<PermissionSubject> permissions = super.getPermissionCheckSubjects();
if (needPermissionForConnectingToConsole()) {
permissions.add(new PermissionSubject(getVmId(), VdcObjectType.VM, ActionGroup.RECONNECT_TO_VM, EngineMessage.USER_CANNOT_FORCE_RECONNECT_TO_VM));
neededPermissions = true;
}
return permissions;
}
use of org.ovirt.engine.core.bll.utils.PermissionSubject in project ovirt-engine by oVirt.
the class RemoveVmNumaNodesCommand method getPermissionCheckSubjects.
@Override
public List<PermissionSubject> getPermissionCheckSubjects() {
List<PermissionSubject> permissionList = new ArrayList<>();
permissionList.add(new PermissionSubject(getParameters().getVmId(), VdcObjectType.VM, getActionType().getActionGroup()));
return permissionList;
}
Aggregations