Maor Lipchuk has uploaded a new change for review. Change subject: core: Use new permission for LSM ......................................................................
core: Use new permission for LSM Add new permission for LSM to be used for all the roles which has the permissions for CONFIGURE_DISK_STORAGE. Also change the permissions at LiveMigrateVmDisksCommand to be used for DISK_LIVE_STORAGE_MIGRATION on the disk, instead using the permissions for MANIPULATE_VM_SNAPSHOTS on the VM. Change-Id: I3ba7e03780ba6ef455447a4eaa34a71b1f63d8cb Bug-Url: https://bugzilla.redhat.com/1111095 Signed-off-by: Maor Lipchuk <mlipc...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateVmDisksCommand.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ActionGroup.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/configure/roles_ui/RoleTreeView.java M frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java 4 files changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/87/37287/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateVmDisksCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateVmDisksCommand.java index feedf50..2197bbe 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateVmDisksCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateVmDisksCommand.java @@ -162,13 +162,13 @@ permissionList.add(new PermissionSubject(diskImage.getId(), VdcObjectType.Disk, ActionGroup.CONFIGURE_DISK_STORAGE)); + permissionList.add(new PermissionSubject(diskImage.getId(), + VdcObjectType.Disk, + ActionGroup.DISK_LIVE_STORAGE_MIGRATION)); } permissionList.add(new PermissionSubject(parameters.getTargetStorageDomainId(), VdcObjectType.Storage, ActionGroup.CREATE_DISK)); - permissionList.add(new PermissionSubject(parameters.getVmId(), - VdcObjectType.VM, - ActionGroup.MANIPULATE_VM_SNAPSHOTS)); } return permissionList; diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ActionGroup.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ActionGroup.java index c8a8d1f..f4531e9 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ActionGroup.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ActionGroup.java @@ -107,6 +107,7 @@ DELETE_DISK(1104, RoleType.USER, true, ApplicationMode.VirtOnly), CONFIGURE_SCSI_GENERIC_IO(1105, RoleType.ADMIN, true, ApplicationMode.VirtOnly), ACCESS_IMAGE_STORAGE(1106, RoleType.USER, false, ApplicationMode.VirtOnly), + DISK_LIVE_STORAGE_MIGRATION(1107, RoleType.ADMIN, true, ApplicationMode.VirtOnly), // VNIC Profiles CONFIGURE_NETWORK_VNIC_PROFILE(1203, RoleType.ADMIN, true, ApplicationMode.VirtOnly), diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/configure/roles_ui/RoleTreeView.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/configure/roles_ui/RoleTreeView.java index 80f4815..6a07489 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/configure/roles_ui/RoleTreeView.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/configure/roles_ui/RoleTreeView.java @@ -122,7 +122,8 @@ roleNode(ActionGroup.ATTACH_DISK, getConstants().allowToAttachDiskToVmRoleTreeTooltip()), roleNode(ActionGroup.EDIT_DISK_PROPERTIES, getConstants().allowToChangePropertiesOfTheDiskRoleTreeTooltip()), roleNode(ActionGroup.CONFIGURE_SCSI_GENERIC_IO, getConstants().allowToChangeSGIORoleTreeTooltip()), - roleNode(ActionGroup.ACCESS_IMAGE_STORAGE, getConstants().allowAccessImageDomainRoleTreeTooltip()) ), + roleNode(ActionGroup.ACCESS_IMAGE_STORAGE, getConstants().allowAccessImageDomainRoleTreeTooltip()), + roleNode(ActionGroup.DISK_LIVE_STORAGE_MIGRATION, getConstants().allowToLiveMigrateDiskToAnotherStorageDomainRoleTreeTooltip())), categoryNode(getConstants().attachDiskProfileRoleTree(), getConstants().notePermissionsContainingDiskProfileOperationsRoleTreeTooltip(), roleNode(ActionGroup.ATTACH_DISK_PROFILE, getConstants().allowToAttachDiskProfileToDiskRoleTreeTooltip()) ) ); diff --git a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java index 8dec062..36e786a 100644 --- a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java +++ b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java @@ -1343,6 +1343,9 @@ @DefaultStringValue("Allow to move Disk to another Storage Domain") String allowToMoveDiskToAnotherStorageDomainRoleTreeTooltip(); + @DefaultStringValue("Allow to live migrate a Disk to another Storage Domain") + String allowToLiveMigrateDiskToAnotherStorageDomainRoleTreeTooltip(); + @DefaultStringValue("Allow to attach Disk to a VM") String allowToAttachDiskToVmRoleTreeTooltip(); -- To view, visit http://gerrit.ovirt.org/37287 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ba7e03780ba6ef455447a4eaa34a71b1f63d8cb Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches