Omer Frenkel has posted comments on this change.
Change subject: frontend,engine: inherit template permissions on VM creation
......................................................................
Patch Set 3: (3 inline comments)
does the permissions from the source vm are copied to the template? i am not
sure about it, did you verify the new vm get the permission of the source vm?
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java
Line 779: getCompensationContext().snapshotNewEntity(perms);
Line 780: }
Line 781:
Line 782:
Line 783: if (getParameters().isCopyTemplatePermissions() &&
getVmTemplateId() != null && !getVmTemplateId().equals(Guid.Empty)) {
please use VmTemplateHandler.BlankVmTemplateId (i guess this is what you
meant..)
Line 784: copyTemplatePermissions();
Line 785: }
Line 786: }
Line 787:
Line 785: }
Line 786: }
Line 787:
Line 788: private void copyTemplatePermissions() {
Line 789: if (!getParameters().isCopyTemplatePermissions()) {
the caller already check for the parameter, so its redundant here or there
(unless i missed something)
Line 790: return;
Line 791: }
Line 792:
Line 793: PermissionDAO dao = getDbFacade().getPermissionDao();
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromTemplateCommand.java
Line 79: }
Line 80:
Line 81: @Override
Line 82: protected void addVmPermission() {
Line 83: super.addVmPermission();
why override is needed?
Line 84:
Line 85:
Line 86:
Line 87:
--
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: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: Frank Kobzik <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Martin Betak <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Shahar Havivi <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches