Yair Zaslavsky has submitted this change and it was merged.

Change subject: core: SQL exception is thrown when assigning a permissions
......................................................................


core: SQL exception is thrown when assigning a permissions

The SQL exception occurs as the user (or group) is added to the database,
even though it was already added.
This happens as webadmin passes the group and user objects with a NULL id
(the external ID is the one that represents the "real id" - that is the id
in the external directory system).

The solution is to check if such a user (or a group) already exists in DB,
and if not - add it.

Change-Id: Ie518061d081c09a25fe5582899a6105df629ab06
Bug-Url: https://bugzilla.redhat.com/1057147
Signed-off-by: Yair Zaslavsky <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddPermissionCommand.java
1 file changed, 19 insertions(+), 9 deletions(-)

Approvals:
  Yair Zaslavsky: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie518061d081c09a25fe5582899a6105df629ab06
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Martin PeÅ™ina <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to