Alon Bar-Lev has uploaded a new change for review. Change subject: aaa: return principal record only if success ......................................................................
aaa: return principal record only if success Topic: AAA Change-Id: I6d07f137ac7a51b1638ad31a66ff54d0a521f812 Signed-off-by: Alon Bar-Lev <[email protected]> --- M backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/AuthzUtils.java 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/96/28996/1 diff --git a/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/AuthzUtils.java b/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/AuthzUtils.java index 8a50470..b217e68 100644 --- a/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/AuthzUtils.java +++ b/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/AuthzUtils.java @@ -28,13 +28,18 @@ } public static ExtMap fetchPrincipalRecord(final ExtensionProxy extension, ExtMap authRecord) { - return extension.invoke(new ExtMap().mput( + ExtMap ret = null; + ExtMap output = extension.invoke(new ExtMap().mput( Base.InvokeKeys.COMMAND, Authz.InvokeCommands.FETCH_PRINCIPAL_RECORD ).mput( Authn.InvokeKeys.AUTH_RECORD, authRecord - )).<ExtMap> get(Authz.InvokeKeys.PRINCIPAL_RECORD); + )); + if (output.<Integer>get(Authz.InvokeKeys.STATUS) == Authz.Status.SUCCESS) { + ret = output.<ExtMap> get(Authz.InvokeKeys.PRINCIPAL_RECORD); + } + return ret; } public static List<DirectoryUser> findPrincipalsByQuery( -- To view, visit http://gerrit.ovirt.org/28996 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6d07f137ac7a51b1638ad31a66ff54d0a521f812 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
