Alon Bar-Lev has uploaded a new change for review. Change subject: aaa: map auth record just before fetch principal ......................................................................
aaa: map auth record just before fetch principal this is required so we always map the auth record regardless of how it was constructed. Topic: AAA Change-Id: I73851ccb7594107baa98d32917f2b47318c7bb32 Signed-off-by: Alon Bar-Lev <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/LoginBaseCommand.java 1 file changed, 17 insertions(+), 15 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/12/29012/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/LoginBaseCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/LoginBaseCommand.java index fefc70a..c777855 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/LoginBaseCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/LoginBaseCommand.java @@ -225,6 +225,23 @@ return false; } + ExtensionProxy mapper = profile.getMapper(); + if (mapper != null) { + authRecord = mapper.invoke( + new ExtMap().mput( + Base.InvokeKeys.COMMAND, + Mapping.InvokeCommands.MAP_AUTH_RECORD + ).mput( + Authn.InvokeKeys.AUTH_RECORD, + authRecord + ), + true + ).<ExtMap> get( + Authn.InvokeKeys.AUTH_RECORD, + authRecord + ); + } + ExtMap principalRecord = AuthzUtils.fetchPrincipalRecord(profile.getAuthz(), authRecord); if (principalRecord == null) { log.infoFormat( @@ -407,21 +424,6 @@ addCanDoActionMessage(msg); } - } else { - authRecord = outputMap.<ExtMap> get(Authn.InvokeKeys.AUTH_RECORD); - if (mapper != null) { - authRecord = mapper.invoke(new ExtMap().mput( - Base.InvokeKeys.COMMAND, - Mapping.InvokeCommands.MAP_AUTH_RECORD - ).mput( - Authn.InvokeKeys.AUTH_RECORD, - authRecord - ) - , true).<ExtMap> get( - Authn.InvokeKeys.AUTH_RECORD, - authRecord - ); - } } } -- To view, visit http://gerrit.ovirt.org/29012 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I73851ccb7594107baa98d32917f2b47318c7bb32 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
