Change in ovirt-engine[ovirt-engine-3.6]: core: Added permissions on AddProfileBase

tnisan at redhat.com tnisan at redhat.com
Thu Apr 21 12:11:36 UTC 2016


Tal Nisan 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 at redhat.com>
---
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/AddVdsGroupCommand.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/AddVdsGroupCommandTest.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
12 files changed, 435 insertions(+), 37 deletions(-)

Approvals:
  Daniel Erez: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Tomer Saban: Verified



-- 
To view, visit https://gerrit.ovirt.org/55946
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6f65daf1e46be9521e8541932ce84710175a6c66
Gerrit-PatchSet: 9
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.6
Gerrit-Owner: Tomer Saban <tsaban at redhat.com>
Gerrit-Reviewer: Alexander Wels <awels at redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Jenny Tokar <jtokar at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Tomer Saban <tsaban at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list