
Roy Golan has submitted this change and it was merged. Change subject: core: Added permissions on AddProfileBase ...................................................................... core: Added permissions on AddProfileBase When adding Disk/Cpu Profile there is always a need to add permissions on the profile. For that reason, I added an abstract method addPermissions() that will run each time add profile command is executed. This method will be implemented by the add Disk/CPU profile commands with the necessary permissions. The developer may cancel the automatic call of addPermissions by giving false in the constructor. Also, Create/Update/Remove and 'Assign' permissions are given to the user that created the profile and 'Assign' permissions to everyone else. Also, this patch changes the way the CPU Profile is added when running the 'AddClusterCommand'. Instead of adding the CPU Profile directly to the Database which bypasses all the necessary validations, this patch uses the 'AddCpuProfileCommand'. Change-Id: I6f65daf1e46be9521e8541932ce84710175a6c66 Bug-Url: https://bugzilla.redhat.com/1143869 Signed-off-by: Tomer Saban <tsaban@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddClusterCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddPermissionCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/profiles/AddCpuProfileCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/profiles/AddDiskProfileCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/profiles/AddProfileCommandBase.java A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddClusterCommandTest.java A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/profiles/AddCpuProfileCommandTest.java A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/profiles/CpuProfileHelperTest.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/CpuProfileParameters.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/ProfileParametersBase.java M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendCpuProfilesResource.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/profiles/CpuProfileBaseModel.java A packaging/dbscripts/upgrade/04_00_0410_updating_cpu_profile_roles.sql 13 files changed, 427 insertions(+), 21 deletions(-) Approvals: Eli Mesika: Looks good to me, but someone else must approve Jenkins CI: Passed CI tests Tomer Saban: Verified Roy Golan: Looks good to me, approved -- To view, visit https://gerrit.ovirt.org/51636 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6f65daf1e46be9521e8541932ce84710175a6c66 Gerrit-PatchSet: 31 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tomer Saban <tsaban@redhat.com> Gerrit-Reviewer: Andrej Krejcir <akrejcir@redhat.com> Gerrit-Reviewer: Eli Mesika <emesika@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Jenny Tokar <jtokar@redhat.com> Gerrit-Reviewer: Martin Sivák <msivak@redhat.com> Gerrit-Reviewer: Phillip Bailey <phbailey@redhat.com> Gerrit-Reviewer: Roman Mohr <rmohr@redhat.com> Gerrit-Reviewer: Roy Golan <rgolan@redhat.com> Gerrit-Reviewer: Tomer Saban <tsaban@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>