Livnat Peer has posted comments on this change.

Change subject: engine: Require Permissions on Network
......................................................................


Patch Set 5: (2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmInterfaceCommand.java
Line 250:         if (getParameters().getInterface() != null && 
StringUtils.isNotEmpty(getNetworkName()) && getVm() != null) {
Line 251: 
Line 252:             Network network = 
getNetworkDAO().getByNameAndCluster(getNetworkName(), getVm().getVdsGroupId());
Line 253:             permissionList.add(new PermissionSubject(network == null 
? null : network.getId(),
Line 254:                     VdcObjectType.Network,
Can we use  getActionType().getActionGroup() instead of CONFIGURE_VM_NETWORK?
Line 255:                     ActionGroup.CONFIGURE_VM_NETWORK));
Line 256: 
Line 257:             if (getParameters().getInterface().isPortMirroring()) {
Line 258:                 permissionList.add(new PermissionSubject(network == 
null ? null : network.getId(),


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmInterfaceCommand.java
Line 197:             VmNetworkInterface iface =
Line 198:                     
getDbFacade().getVmNetworkInterfaceDao().get(getParameters().getInterface().getId());
Line 199:             if (iface != null) {
Line 200:                 Network network = 
getNetworkDAO().getByNameAndCluster(getNetworkName(), getVm().getVdsGroupId());
Line 201: 
If I have permission to do port mirroring on the network do I need another 
permission for using the network? I think it is not necessary.
Same comment for add network to VM and to Template
Line 202:                 // If the vNic's network is changed, the user should 
have permission for using the new network
Line 203:                 if (isNetworkChanged(iface)) {
Line 204:                     permissionList.add(new PermissionSubject(network 
== null ? null : network.getId(),
Line 205:                             VdcObjectType.Network,


--
To view, visit http://gerrit.ovirt.org/9544
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ife019f6195b8a8c09e7dba989f37f150700dbaea
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Moti Asayag <[email protected]>
Gerrit-Reviewer: Livnat Peer <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Muli Salem <[email protected]>
Gerrit-Reviewer: Sharad Mishra <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to