Change in ovirt-engine[master]: engine: informative message for vm console connect(#833730)

Doron Fediuck has submitted this change and it was merged. Change subject: engine: informative message for vm console connect(#833730) ...................................................................... engine: informative message for vm console connect(#833730) https://bugzilla.redhat.com/833730 Problem: - there was a non informative message given when a user trys to connect via spice to a vm when he was not the last user connected and does not own force connect permissions Solution: - added custom messaging to the permissions checking mechanism Technical aspect: - added a member of type VdcBllMessages named "message" to PermissionSubject - in method IsUserAutorizedToRunAction inside CommandBase, when checkUserAuthorization fails if PermissionSubject.message != null add it to addCanDoActionMessage else add USER_NOT_AUTHORIZED_TO_PERFORM_ACTION Additional changes: - Quotable.java and PermissionSubject.java were moved from package common to bll, they shouldnt have been there in the first place - an unnecessary cast to quotable was removed from the dal - both were done to prevent cross dependencies between dal <-> bll <-> common - other then those five files many had to be changed, but just to change the import from .common. to .bll. with no behavioral change Change-Id: Ic9fadff662f0d63fd27bacfbf7d765917271932d Signed-off-by: Noam Slomianko <nslomian@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AdGroupsHandlingCommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.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/AddQuotaCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddRoleCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddRoleWithActionGroupsCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddUserCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.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/AddVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromScratchCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromSnapshotCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmInterfaceCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmPoolWithVmsCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AdminOperationCommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AttachActionGroupsToRoleCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AttachDiskToVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeUserPasswordCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVMClusterCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommonVmPoolWithVmsCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateComputerAccountCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/LoginBaseCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/LogoutUserCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MaintananceNumberOfVdssCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateIrsSnapshotsToVdcCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyTemplateCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/PermissionsCommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/QuotaCRUDCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ReloadConfigurationsCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveQuotaCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveUserCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmTemplateCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestoreAllSnapshotsCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RolesCommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SetVmTicketCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/StopVmCommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateQuotaCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmInterfaceCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UserCommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsGroupCommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmPoolCommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmTemplateCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterCommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterVolumeCommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/job/ExecutionHandler.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/ChangeQuotaCommand.java R backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/Quotable.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddEmptyStoragePoolCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageDomainCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/FenceVdsManualyCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageDomainCommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHandlingCommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageServerConnectionCommandBase.java R backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/PermissionSubject.java M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/CommandBaseTest.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java M frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties 75 files changed, 125 insertions(+), 101 deletions(-) Approvals: Doron Fediuck: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/7496 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic9fadff662f0d63fd27bacfbf7d765917271932d Gerrit-PatchSet: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Noam Slomianko <nslomian@redhat.com> Gerrit-Reviewer: Doron Fediuck <dfediuck@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchaplik@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek@redhat.com> Gerrit-Reviewer: Noam Slomianko <nslomian@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofrenkel@redhat.com> Gerrit-Reviewer: Shireesh Anjal <sanjal@redhat.com> Gerrit-Reviewer: Vojtech Szocs <vszocs@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server
participants (1)
-
dfediuck@redhat.com