Yair Zaslavsky has uploaded a new change for review.

Change subject: aaa: changing LoginBaseCommand authenticate return result
......................................................................

aaa: changing LoginBaseCommand authenticate return result

Change-Id: I85b23b7331c0bbefd7bc098b16356b29f36ba79b
Topic: AAA
Signed-off-by: Yair Zaslavsky <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/LoginBaseCommand.java
1 file changed, 6 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/73/28273/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 f9c733e..1e30496 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
@@ -208,7 +208,7 @@
                 loginName = curUser.getLoginName();
                 password = curPassword;
             }
-            authRecord = authenticate(loginName, password);
+            authenticate(loginName, password);
         }
         // Perform the actual authentication:
         if (authRecord != null) {
@@ -309,8 +309,7 @@
                 Authn.Capabilities.AUTHENTICATE_PASSWORD) != 0;
     }
 
-    private ExtMap authenticate(String user, String password) {
-        ExtMap result = null;
+    private void authenticate(String user, String password) {
         ExtensionProxy mapper = profile.getMapper();
         if (mapper != null) {
             user = mapper.invoke(new ExtMap().mput(
@@ -372,25 +371,23 @@
                 }
                 addCanDoActionMessage(msg);
             }
-            result = null;
         } else {
-            result = outputMap.<ExtMap> get(Authn.InvokeKeys.AUTH_RECORD);
+            authRecord = outputMap.<ExtMap> get(Authn.InvokeKeys.AUTH_RECORD);
             if (mapper != null) {
-                result = mapper.invoke(new ExtMap().mput(
+                authRecord = mapper.invoke(new ExtMap().mput(
                                 Base.InvokeKeys.COMMAND,
                                 Mapping.InvokeCommands.MAP_AUTH_RECORD
                                 ).mput(
                                         Authn.InvokeKeys.AUTH_RECORD,
-                                result
+                                authRecord
                         )
                         , true).<ExtMap> get(
                         Authn.InvokeKeys.AUTH_RECORD,
-                        result
+                        authRecord
                         );
             }
 
         }
-        return result;
     }
 
 }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85b23b7331c0bbefd7bc098b16356b29f36ba79b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to