Omer Frenkel has posted comments on this change. Change subject: frontend,engine: inherit template permissions on VM creation ......................................................................
Patch Set 7: (3 inline comments) minor comments .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java Line 804: Line 805: } Line 806: Line 807: if (vmPermissions.size() > 0) { Line 808: MultiLevelAdministrationHandler.addPermission(vmPermissions.toArray(new permissions[vmPermissions.size()])); since the command is non transactive, there is a need to snapshot the entity, for compensation in case of failure Line 809: } Line 810: } Line 811: Line 812: protected void addDiskPermissions(List<DiskImage> newDiskImages) { .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromTemplateCommand.java Line 1: package org.ovirt.engine.core.bll; Line 2: Line 3: import java.util.HashMap; Line 4: import java.util.List; Line 5: import java.util.Map; basically you could leave this file out of the patch.. Line 6: import org.ovirt.engine.core.bll.job.ExecutionHandler; Line 7: import org.ovirt.engine.core.common.action.AddVmFromTemplateParameters; Line 8: import org.ovirt.engine.core.common.action.CreateCloneOfTemplateParameters; Line 9: import org.ovirt.engine.core.common.action.VdcActionType; .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java Line 541: copyVmPermissions(); Line 542: } Line 543: Line 544: private void copyVmPermissions() { Line 545: if (getVmId() == null || !getParameters().isCopyVmPermissions()) { its better to use isVmInDb instead of the null check Line 546: return; Line 547: } Line 548: Line 549: PermissionDAO dao = getDbFacade().getPermissionDao(); -- To view, visit http://gerrit.ovirt.org/15667 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6e6fddcea410ab8fee5851468980b8eeb0dad428 Gerrit-PatchSet: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: Frank Kobzik <fkob...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Martin Betak <mbe...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Shahar Havivi <shav...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches