Ravi Nori has uploaded a new change for review.

Change subject: aaa: Remove frontend login sequence
......................................................................

aaa: Remove frontend login sequence

Longer description using lines' length under 72 chars.

With multiple paragraphs if necessary.

Change-Id: I8c17155983c185585eab2cbb23133c6d32898201
Bug-Url: https://bugzilla.redhat.com/??????
Signed-off-by: Ravi Nori <[email protected]>
---
D 
backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/filters/LoginFilter.java
M 
backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/filters/SSOLoginFilter.java
M backend/manager/modules/restapi/webapp/src/main/webapp/WEB-INF/web.xml
M 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java
M 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/CommunicationProvider.java
M 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/GWTRPCCommunicationProvider.java
M 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/OperationProcessor.java
M 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/VdcOperationManager.java
M 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/gwtservices/GenericApiGWTService.java
M 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java
M 
frontend/webadmin/modules/frontend/src/test/java/org/ovirt/engine/ui/frontend/FrontendActionTest.java
M 
frontend/webadmin/modules/frontend/src/test/java/org/ovirt/engine/ui/frontend/communication/VdcOperationManagerTest.java
D 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/AbstractLoginPresenterWidget.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/LoginModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalLoginModel.java
M frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/web.xml
M frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/web.xml
17 files changed, 6 insertions(+), 799 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/90/38390/1

diff --git 
a/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/filters/LoginFilter.java
 
b/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/filters/LoginFilter.java
deleted file mode 100644
index 14df8d6..0000000
--- 
a/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/filters/LoginFilter.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package org.ovirt.engine.core.aaa.filters;
-
-import java.io.IOException;
-
-import javax.naming.InitialContext;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.ovirt.engine.api.extensions.ExtMap;
-import org.ovirt.engine.core.aaa.AuthType;
-import org.ovirt.engine.core.common.action.LoginUserParameters;
-import org.ovirt.engine.core.common.action.VdcActionType;
-import org.ovirt.engine.core.common.action.VdcLoginReturnValueBase;
-import org.ovirt.engine.core.common.constants.SessionConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class LoginFilter implements Filter {
-
-    private static final Logger log = 
LoggerFactory.getLogger(LoginFilter.class);
-
-    private boolean loginAsAdmin;
-
-    @Override
-    public void init(FilterConfig filterConfig) throws ServletException {
-        loginAsAdmin = 
Boolean.parseBoolean(filterConfig.getInitParameter("login-as-admin"));
-    }
-
-    @Override
-    public void doFilter(ServletRequest request, ServletResponse response, 
FilterChain chain) throws IOException,
-            ServletException {
-        boolean doFilter = false;
-        try {
-            HttpServletRequest req = (HttpServletRequest) request;
-            if (!FiltersHelper.isAuthenticated(req)) {
-                String profileName = (String) 
request.getAttribute(FiltersHelper.Constants.REQUEST_PROFILE_KEY);
-
-                ExtMap authRecord = (ExtMap) 
request.getAttribute(FiltersHelper.Constants.REQUEST_AUTH_RECORD_KEY);
-                if (authRecord != null) {
-                    InitialContext context = new InitialContext();
-                    try {
-                        VdcLoginReturnValueBase returnValue = 
(VdcLoginReturnValueBase)FiltersHelper.getBackend(context).login(new
-                                LoginUserParameters(
-                                        profileName,
-                                        authRecord,
-                                        
(String)request.getAttribute(FiltersHelper.Constants.REQUEST_PASSWORD_KEY),
-                                        loginAsAdmin ? 
VdcActionType.LoginAdminUser : VdcActionType.LoginUser,
-                                        
(AuthType)request.getAttribute(FiltersHelper.Constants.REQUEST_AUTH_TYPE_KEY)
-                               )
-                        );
-                        if (returnValue.getSucceeded()) {
-                            request.setAttribute(
-                                    
SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY,
-                                    returnValue.getSessionId()
-                                    );
-                        }
-                    } finally {
-                        context.close();
-                    }
-                }
-            }
-            doFilter = true;
-        } catch (Exception ex) {
-            log.error("Error in login to engine ", ex);
-            ((HttpServletResponse) 
response).sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
-        }
-        if (doFilter) {
-            chain.doFilter(request, response);
-        }
-
-    }
-
-    @Override
-    public void destroy() {
-    }
-
-}
diff --git 
a/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/filters/SSOLoginFilter.java
 
b/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/filters/SSOLoginFilter.java
index 09a1909..66f39a7 100644
--- 
a/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/filters/SSOLoginFilter.java
+++ 
b/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/filters/SSOLoginFilter.java
@@ -32,12 +32,13 @@
     public void doFilter(ServletRequest request, ServletResponse response, 
FilterChain chain) throws IOException,
             ServletException {
         HttpServletRequest req = (HttpServletRequest) request;
-        String queryString = req.getQueryString();
-        String requestUri = req.getRequestURI() + 
(StringUtils.isEmpty(queryString) ? "" : "?" + queryString);
-
+        StringBuffer requestURL = req.getRequestURL();
+        if (StringUtils.isNotEmpty(req.getQueryString())) {
+            requestURL.append("?").append(req.getQueryString());
+        }
         try {
             if (!FiltersHelper.isAuthenticated(req) || 
!FiltersHelper.isSessionValid((HttpServletRequest) request)) {
-                ((HttpServletResponse) 
response).sendRedirect(String.format("%s%s&app_url=%s", 
req.getServletContext().getContextPath(), loginUrl, ((HttpServletResponse) 
response).encodeURL(requestUri)));
+                ((HttpServletResponse) 
response).sendRedirect(String.format("%s%s&app_url=%s", 
req.getServletContext().getContextPath(), loginUrl, ((HttpServletResponse) 
response).encodeURL(requestURL.toString())));
             } else {
                 chain.doFilter(request, response);
             }
diff --git 
a/backend/manager/modules/restapi/webapp/src/main/webapp/WEB-INF/web.xml 
b/backend/manager/modules/restapi/webapp/src/main/webapp/WEB-INF/web.xml
index 11030b1..8c05668 100644
--- a/backend/manager/modules/restapi/webapp/src/main/webapp/WEB-INF/web.xml
+++ b/backend/manager/modules/restapi/webapp/src/main/webapp/WEB-INF/web.xml
@@ -105,15 +105,6 @@
     </filter-mapping>
 
     <filter>
-        <filter-name>LoginFilter</filter-name>
-        
<filter-class>org.ovirt.engine.core.aaa.filters.LoginFilter</filter-class>
-    </filter>
-    <filter-mapping>
-        <filter-name>LoginFilter</filter-name>
-        <url-pattern>/*</url-pattern>
-    </filter-mapping>
-
-    <filter>
         <filter-name>EnforceAuthFilter</filter-name>
         
<filter-class>org.ovirt.engine.core.aaa.filters.EnforceAuthFilter</filter-class>
         <!-- schemes parameter names should be in format of scheme.XXX Add
diff --git 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java
 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java
index 479cf4a..895c7ed 100644
--- 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java
+++ 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java
@@ -7,8 +7,6 @@
 import java.util.List;
 import java.util.logging.Level;
 import java.util.logging.Logger;
-
-import org.ovirt.engine.core.common.action.LoginUserParameters;
 import org.ovirt.engine.core.common.action.VdcActionParametersBase;
 import org.ovirt.engine.core.common.action.VdcActionType;
 import org.ovirt.engine.core.common.action.VdcReturnValueBase;
@@ -777,55 +775,6 @@
                         }
                     }
                 }, state, !aggregateErrors || failureCallback != null);
-    }
-
-    /**
-     * ASynchronous user login.
-     * @param userName The name of the user.
-     * @param password The password of the user.
-     * @param profileName The authentication profile used to check the 
credentials of the user.
-     * @param isAdmin If the user an admin user.
-     * @param callback The callback to call when the operation is finished.
-     */
-    public void loginAsync(final String userName,
-            final String password,
-            final String profileName,
-            final boolean isAdmin,
-            final AsyncQuery callback) {
-        LoginUserParameters params = new LoginUserParameters(profileName, 
userName, password);
-        VdcActionType action = isAdmin ? VdcActionType.LoginAdminUser : 
VdcActionType.LoginUser;
-        VdcOperation<VdcActionType, LoginUserParameters> loginOperation =
-            new VdcOperation<VdcActionType, LoginUserParameters>(action, 
params, true, //Public action.
-                    new VdcOperationCallback<VdcOperation<VdcActionType, 
LoginUserParameters>,
-                    VdcReturnValueBase>() {
-                @Override
-                public void onSuccess(final VdcOperation<VdcActionType, 
LoginUserParameters> operation,
-                        final VdcReturnValueBase result) {
-                    setLoggedInUser((DbUser) result.getActionReturnValue());
-                    result.setCanDoActionMessages((ArrayList<String>) 
translateError(result));
-                    callback.getDel().onSuccess(callback.getModel(), result);
-                    if (getLoginHandler() != null && result.getSucceeded()) {
-                        getLoginHandler().onLoginSuccess();
-                    }
-                }
-
-                @Override
-                public void onFailure(final VdcOperation<VdcActionType, 
LoginUserParameters> operation,
-                        final Throwable caught) {
-                    if (ignoreFailure(caught)) {
-                        return;
-                    }
-                    logger.log(Level.SEVERE, "Failed to login: " + caught, 
caught); //$NON-NLS-1$
-                    getEventsHandler().runQueryFailed(null);
-                    failureEventHandler(caught);
-                    if (callback.isHandleFailure()) {
-                        setLoggedInUser(null);
-                        callback.getDel().onSuccess(callback.getModel(), null);
-                    }
-                }
-        });
-
-        getOperationManager().loginUser(loginOperation);
     }
 
     /**
diff --git 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/CommunicationProvider.java
 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/CommunicationProvider.java
index 680a2f0..154a54c 100644
--- 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/CommunicationProvider.java
+++ 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/CommunicationProvider.java
@@ -2,9 +2,6 @@
 
 import java.util.List;
 
-import org.ovirt.engine.core.common.action.LoginUserParameters;
-import org.ovirt.engine.core.common.action.VdcActionType;
-
 /**
  * Interface defining the communication options between the client and the 
server.
  */
@@ -17,12 +14,6 @@
      * @param operations The list of {@code VdcOperation}s
      */
     void transmitOperationList(List<VdcOperation<?, ?>> operations);
-
-    /**
-     * Log in user, using the communications provider.
-     * @param loginOperation The login operation.
-     */
-    void login(VdcOperation<VdcActionType, LoginUserParameters> 
loginOperation);
 
     /**
      * Log out user, using the communications provider.
diff --git 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/GWTRPCCommunicationProvider.java
 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/GWTRPCCommunicationProvider.java
index 46f2139..701c5ea 100644
--- 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/GWTRPCCommunicationProvider.java
+++ 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/GWTRPCCommunicationProvider.java
@@ -5,7 +5,6 @@
 import java.util.List;
 import java.util.Map;
 
-import org.ovirt.engine.core.common.action.LoginUserParameters;
 import org.ovirt.engine.core.common.action.VdcActionParametersBase;
 import org.ovirt.engine.core.common.action.VdcActionType;
 import org.ovirt.engine.core.common.action.VdcReturnValueBase;
@@ -467,43 +466,6 @@
         }
 
         return result;
-    }
-
-    /**
-     * Log in the user.
-     * @param loginOperation The login operation.
-     */
-    @Override
-    public void login(final VdcOperation<VdcActionType, LoginUserParameters> 
loginOperation) {
-        getService(new ServiceCallback() {
-            @Override
-            public void serviceFound(GenericApiGWTServiceAsync service) {
-                service.login(loginOperation.getParameter().getLoginName(),
-                        loginOperation.getParameter().getPassword(),
-                        loginOperation.getParameter().getProfileName(), 
loginOperation.getOperation(),
-                        new AsyncCallback<VdcReturnValueBase>() {
-                    @Override
-                    public void onSuccess(final VdcReturnValueBase result) {
-                        //Remove the rpc token when logging in. Due to session 
fixation protection we need a new
-                        //token based on the new session.
-                        xsrfRequestBuilder.setXsrfToken(null);
-                        loginOperation.getCallback().onSuccess(loginOperation, 
result);
-                    }
-
-                    @Override
-                    public void onFailure(final Throwable caught) {
-                        //Clear out the token, and let the retry mechanism try 
again.
-                        xsrfRequestBuilder.setXsrfToken(null);
-                        loginOperation.getCallback().onFailure(loginOperation, 
caught);
-                    }
-                });
-            }
-
-            @Override
-            public void onFailure(Throwable exception) {
-                loginOperation.getCallback().onFailure(loginOperation, 
exception);
-            }
-        });
     }
 
     /**
diff --git 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/OperationProcessor.java
 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/OperationProcessor.java
index 3e31a59..44c2502 100644
--- 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/OperationProcessor.java
+++ 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/OperationProcessor.java
@@ -6,9 +6,6 @@
 import java.util.List;
 import java.util.Map;
 
-import org.ovirt.engine.core.common.action.LoginUserParameters;
-import org.ovirt.engine.core.common.action.VdcActionType;
-
 import com.google.gwt.core.client.Scheduler;
 import com.google.gwt.core.client.Scheduler.ScheduledCommand;
 import com.google.inject.Inject;
@@ -248,14 +245,6 @@
         }
 
         return originalOperation;
-    }
-
-    /**
-     * Log in the user.
-     * @param loginOperation The operation to log the user in.
-     */
-    public void loginUser(final VdcOperation<VdcActionType, 
LoginUserParameters> loginOperation) {
-        communicationProvider.login(loginOperation);
     }
 
     /**
diff --git 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/VdcOperationManager.java
 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/VdcOperationManager.java
index 44ab3ede..efe91e3 100644
--- 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/VdcOperationManager.java
+++ 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/communication/VdcOperationManager.java
@@ -3,9 +3,6 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.ovirt.engine.core.common.action.LoginUserParameters;
-import org.ovirt.engine.core.common.action.VdcActionType;
-import org.ovirt.engine.core.common.action.VdcReturnValueBase;
 import org.ovirt.engine.core.common.queries.VdcQueryParametersBase;
 
 import com.google.gwt.event.shared.EventBus;
@@ -116,34 +113,6 @@
      */
     public VdcOperation<?, ?> pollOperation() {
         return !operationQueue.isEmpty() ? operationQueue.remove(0) : null;
-    }
-
-    /**
-     * Log in the user.
-     * @param loginOperation The login operation.
-     */
-    @SuppressWarnings("unchecked")
-    public void loginUser(final VdcOperation<VdcActionType, 
LoginUserParameters> loginOperation) {
-        // TODO: should we retry failed logins?
-        processor.loginUser(new VdcOperation<VdcActionType, 
LoginUserParameters>(loginOperation,
-            new VdcOperationCallback<VdcOperation<VdcActionType, 
LoginUserParameters>, VdcReturnValueBase>() {
-
-                @Override
-                public void onSuccess(final VdcOperation<VdcActionType, 
LoginUserParameters> operation,
-                        final VdcReturnValueBase result) {
-                    loggedIn = true;
-                    
operation.getSource().getCallback().onSuccess(operation.getSource(), result);
-                }
-
-                @Override
-                public void onFailure(final VdcOperation<VdcActionType, 
LoginUserParameters> operation,
-                        final Throwable caught) {
-                    loggedIn = false;
-                    
operation.getSource().getCallback().onFailure(operation.getSource(), caught);
-                }
-
-            })
-        );
     }
 
     /**
diff --git 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/gwtservices/GenericApiGWTService.java
 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/gwtservices/GenericApiGWTService.java
index bec93e3..aaec78d 100644
--- 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/gwtservices/GenericApiGWTService.java
+++ 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/gwtservices/GenericApiGWTService.java
@@ -45,9 +45,6 @@
     @NoXsrfProtect
     public VdcReturnValueBase logOff(DbUser userToLogoff);
 
-    @NoXsrfProtect
-    public VdcReturnValueBase login(String userName, String password, String 
profileName, VdcActionType loginType);
-
     public void storeInHttpSession(String key, String value);
 
     public String retrieveFromHttpSession(String key);
diff --git 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java
 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java
index c2ca20e..67770a4 100644
--- 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java
+++ 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java
@@ -7,11 +7,9 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
 
-import org.ovirt.engine.core.common.action.LoginUserParameters;
 import org.ovirt.engine.core.common.action.LogoutUserParameters;
 import org.ovirt.engine.core.common.action.VdcActionParametersBase;
 import org.ovirt.engine.core.common.action.VdcActionType;
-import org.ovirt.engine.core.common.action.VdcLoginReturnValueBase;
 import org.ovirt.engine.core.common.action.VdcReturnValueBase;
 import org.ovirt.engine.core.common.businessentities.aaa.DbUser;
 import org.ovirt.engine.core.common.constants.SessionConstants;
@@ -166,26 +164,6 @@
         LogoutUserParameters params = new 
LogoutUserParameters(userToLogoff.getId());
         params.setSessionId(getEngineSessionId());
         VdcReturnValueBase returnValue = getBackend().logoff(params);
-        return returnValue;
-    }
-
-    @Override
-    public VdcReturnValueBase login(String userName, String password, String 
profileName, VdcActionType loginType) {
-        LoginUserParameters params = new LoginUserParameters(profileName, 
userName, password);
-        HttpSession originalSession = getSession();
-        // Prevent session fixation.
-        getSession().invalidate();
-        // Calling getSession again after invalidating it should create a new 
session.
-        HttpSession newSession = getSession();
-        assert !newSession.equals(originalSession) : "new session the same as 
old session"; //$NON-NLS-1$
-
-        params.setSessionId(getEngineSessionId());
-        params.setActionType(loginType);
-        VdcLoginReturnValueBase returnValue = (VdcLoginReturnValueBase) 
getBackend().login(params);
-        if (returnValue.getSucceeded()) {
-            this.getThreadLocalResponse().addHeader("OVIRT-SSO-TOKEN", 
returnValue.getSessionId()); //$NON-NLS-1$
-            
getSession().setAttribute(SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY, 
returnValue.getSessionId()); //$NON-NLS-1$)
-        }
         return returnValue;
     }
 
diff --git 
a/frontend/webadmin/modules/frontend/src/test/java/org/ovirt/engine/ui/frontend/FrontendActionTest.java
 
b/frontend/webadmin/modules/frontend/src/test/java/org/ovirt/engine/ui/frontend/FrontendActionTest.java
index 83a538b..c2dc63a 100644
--- 
a/frontend/webadmin/modules/frontend/src/test/java/org/ovirt/engine/ui/frontend/FrontendActionTest.java
+++ 
b/frontend/webadmin/modules/frontend/src/test/java/org/ovirt/engine/ui/frontend/FrontendActionTest.java
@@ -739,147 +739,6 @@
     /**
      * Run the following test case.
      * <ol>
-     *   <li>Attempt to login</li>
-     *   <li>Have the login fail with a status code of 0, which is an ignored 
failure</li>
-     *   <li>Check to make sure the callback is not called</li>
-     *   <li>Check to make sure the events handler is never called</li>
-     *   <li>Login a non admin user</li>
-     *   <li>Make sure the frontend failure handler is never called</li>
-     * </ol>
-     */
-    @Test
-    public void testLoginAsync_non_admin_ignored_failure() {
-        String testUser = "testUser"; //$NON-NLS-1$
-        String testPassword = "testpassword"; //$NON-NLS-1$
-        String testProfile = "testprofile"; //$NON-NLS-1$
-        frontend.loginAsync(testUser, testPassword, testProfile, true, 
mockAsyncQuery);
-        verify(mockService).login(eq(testUser), eq(testPassword), 
eq(testProfile), eq(VdcActionType.LoginAdminUser),
-                callbackAction.capture());
-        StatusCodeException exception = new StatusCodeException(0, "0 status 
code"); //$NON-NLS-1$
-        callbackAction.getValue().onFailure(exception);
-        verify(mockFrontendFailureEvent, never()).raise(eq(Frontend.class), 
(FrontendFailureEventArgs) any());
-        verify(mockEventsHandler, never()).runQueryFailed(null);
-        verify(mockAsyncQuery, never()).isHandleFailure();
-    }
-
-    /**
-     * Run the following test case.
-     * <ol>
-     *   <li>Attempt to login</li>
-     *   <li>Have the login fail with a status code of 0, which is an ignored 
failure</li>
-     *   <li>Check to make sure the callback is not called</li>
-     *   <li>Check to make sure the events handler is never called</li>
-     *   <li>Login an admin user</li>
-     *   <li>Make sure the frontend failure handler is never called</li>
-     * </ol>
-     */
-    @Test
-    public void testLoginAsync_admin_ignored_failure() {
-        String testUser = "testUser"; //$NON-NLS-1$
-        String testPassword = "testpassword"; //$NON-NLS-1$
-        String testProfile = "testprofile"; //$NON-NLS-1$
-        frontend.loginAsync(testUser, testPassword, testProfile, false, 
mockAsyncQuery);
-        verify(mockService).login(eq(testUser), eq(testPassword), 
eq(testProfile), eq(VdcActionType.LoginUser),
-                callbackAction.capture());
-        StatusCodeException exception = new StatusCodeException(0, "0 status 
code"); //$NON-NLS-1$
-        callbackAction.getValue().onFailure(exception);
-        verify(mockFrontendFailureEvent, never()).raise(eq(Frontend.class), 
(FrontendFailureEventArgs) any());
-        verify(mockEventsHandler, never()).runQueryFailed(null);
-        verify(mockAsyncQuery, never()).isHandleFailure();
-    }
-
-    /**
-     * Run the following test case.
-     * <ol>
-     *   <li>Attempt to login</li>
-     *   <li>Have the login fail with a status code of 404</li>
-     *   <li>Check to make sure the callback is called</li>
-     *   <li>Check to make sure the events handler is called</li>
-     *   <li>Make sure the frontend failure handler is called</li>
-     * </ol>
-     */
-    @Test
-    public void testLoginAsync_404_failure() {
-        String testUser = "testUser"; //$NON-NLS-1$
-        String testPassword = "testpassword"; //$NON-NLS-1$
-        String testProfile = "testprofile"; //$NON-NLS-1$
-        frontend.initLoggedInUser(new DbUser(), testPassword);
-        when(mockAsyncQuery.isHandleFailure()).thenReturn(Boolean.TRUE);
-        frontend.loginAsync(testUser, testPassword, testProfile, false, 
mockAsyncQuery);
-        verify(mockService).login(eq(testUser), eq(testPassword), 
eq(testProfile), eq(VdcActionType.LoginUser),
-                callbackAction.capture());
-        StatusCodeException exception = new 
StatusCodeException(HttpServletResponse.SC_NOT_FOUND,
-                "404 status code"); //$NON-NLS-1$
-        callbackAction.getValue().onFailure(exception);
-        verify(mockEventsHandler).runQueryFailed(null);
-        verify(mockFrontendFailureEvent).raise(eq(Frontend.class), 
(FrontendFailureEventArgs) any());
-        assertNull("Logged in user should be null", 
frontend.getLoggedInUser()); //$NON-NLS-1$
-        verify(mockAsyncCallback).onSuccess(any(), any());
-    }
-
-    /**
-     * Run the following test case.
-     * <ol>
-     *   <li>Attempt to login</li>
-     *   <li>Have the login succeed</li>
-     *   <li>Check to make sure the callback is called</li>
-     *   <li>Check to make sure the events handler is called</li>
-     *   <li>Make sure the frontend failure handler is not called</li>
-     * </ol>
-     */
-    @Test
-    public void testLoginAsync_success() {
-        Object model = new Object();
-        when(mockAsyncQuery.getModel()).thenReturn(model);
-        String testUser = "testUser"; //$NON-NLS-1$
-        String testPassword = "testpassword"; //$NON-NLS-1$
-        String testProfile = "testprofile"; //$NON-NLS-1$
-        frontend.initLoggedInUser(new DbUser(), testPassword);
-        when(mockAsyncQuery.isHandleFailure()).thenReturn(Boolean.TRUE);
-        frontend.loginAsync(testUser, testPassword, testProfile, false, 
mockAsyncQuery);
-        verify(mockService).login(eq(testUser), eq(testPassword), 
eq(testProfile), eq(VdcActionType.LoginUser),
-                callbackAction.capture());
-        VdcReturnValueBase returnValue = new VdcReturnValueBase();
-        returnValue.setSucceeded(true);
-        callbackAction.getValue().onSuccess(returnValue);
-        verify(mockAsyncCallback).onSuccess(model, returnValue);
-        verify(mockLoginHandler).onLoginSuccess();
-        verify(mockFrontendFailureEvent, never()).raise(eq(Frontend.class), 
(FrontendFailureEventArgs) any());
-    }
-
-    /**
-     * Run the following test case.
-     * <ol>
-     *   <li>Attempt to login</li>
-     *   <li>Have the login fail</li>
-     *   <li>Check to make sure the callback is called</li>
-     *   <li>Check to make sure the events handler is called</li>
-     *   <li>Make sure the frontend failure handler is not called</li>
-     * </ol>
-     */
-    @Test
-    public void testLoginAsync_login_failure() {
-        Object model = new Object();
-        when(mockAsyncQuery.getModel()).thenReturn(model);
-        String testUser = "testUser"; //$NON-NLS-1$
-        String testPassword = "testpassword"; //$NON-NLS-1$
-        String testProfile = "testprofile"; //$NON-NLS-1$
-        frontend.initLoggedInUser(new DbUser(), testPassword);
-        when(mockAsyncQuery.isHandleFailure()).thenReturn(Boolean.TRUE);
-        frontend.loginAsync(testUser, testPassword, testProfile, false, 
mockAsyncQuery);
-        verify(mockService).login(eq(testUser), eq(testPassword), 
eq(testProfile), eq(VdcActionType.LoginUser),
-                callbackAction.capture());
-        VdcReturnValueBase returnValue = new VdcReturnValueBase();
-        returnValue.setSucceeded(false); // Yes I know this is the default, 
just to be sure.
-        callbackAction.getValue().onSuccess(returnValue);
-        verify(mockAsyncCallback).onSuccess(model, returnValue);
-        verify(mockLoginHandler, never()).onLoginSuccess();
-        verify(mockFrontendFailureEvent, never()).raise(eq(Frontend.class), 
(FrontendFailureEventArgs) any());
-    }
-
-    /**
-     * Run the following test case.
-     * <ol>
      *   <li>Attempt to log-off</li>
      *   <li>Have the log-off fail with a status code of 0, which is an 
ignored failure</li>
      *   <li>Check to make sure the callback is not called</li>
diff --git 
a/frontend/webadmin/modules/frontend/src/test/java/org/ovirt/engine/ui/frontend/communication/VdcOperationManagerTest.java
 
b/frontend/webadmin/modules/frontend/src/test/java/org/ovirt/engine/ui/frontend/communication/VdcOperationManagerTest.java
index c86e0bb..45958b1 100644
--- 
a/frontend/webadmin/modules/frontend/src/test/java/org/ovirt/engine/ui/frontend/communication/VdcOperationManagerTest.java
+++ 
b/frontend/webadmin/modules/frontend/src/test/java/org/ovirt/engine/ui/frontend/communication/VdcOperationManagerTest.java
@@ -2,7 +2,6 @@
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
 import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -13,14 +12,10 @@
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Captor;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
-import org.ovirt.engine.core.common.action.LoginUserParameters;
 import org.ovirt.engine.core.common.action.VdcActionParametersBase;
 import org.ovirt.engine.core.common.action.VdcActionType;
-import org.ovirt.engine.core.common.action.VdcReturnValueBase;
 import org.ovirt.engine.core.common.queries.VdcQueryParametersBase;
 import org.ovirt.engine.core.common.queries.VdcQueryType;
 
@@ -36,37 +31,10 @@
     @Mock
     EventBus mockEventBus;
 
-    @Captor
-    ArgumentCaptor<VdcOperation<VdcActionType, LoginUserParameters>> 
loginOperationCaptor;
-
     @SuppressWarnings("unchecked")
     @Before
     public void setUp() throws Exception {
         testManager = new VdcOperationManager(mockEventBus, 
mockOperationProcessor);
-        final VdcReturnValueBase loginResult = new VdcReturnValueBase();
-        LoginUserParameters params = new LoginUserParameters("test", "test", 
//$NON-NLS-1$ //$NON-NLS-2$
-                "test"); //$NON-NLS-1$
-        VdcActionType action = VdcActionType.LoginUser;
-        VdcOperation<VdcActionType, LoginUserParameters> loginOperation =
-            new VdcOperation<VdcActionType, LoginUserParameters>(action, 
params, true, //Public action.
-                    new VdcOperationCallback<VdcOperation<VdcActionType, 
LoginUserParameters>,
-                    VdcReturnValueBase>() {
-
-                @Override
-                public void onSuccess(final VdcOperation<VdcActionType, 
LoginUserParameters> operation,
-                        final VdcReturnValueBase result) {
-                    assertEquals("Objects should match", loginResult, result); 
//$NON-NLS-1$
-                }
-
-                @Override
-                public void onFailure(final VdcOperation<VdcActionType, 
LoginUserParameters> operation,
-                        final Throwable caught) {
-                    fail("Should not get here"); //$NON-NLS-1$
-                }
-        });
-        testManager.loginUser(loginOperation);
-        
verify(mockOperationProcessor).loginUser(loginOperationCaptor.capture());
-        
loginOperationCaptor.getValue().getCallback().onSuccess(loginOperationCaptor.getValue(),
 loginResult);
     }
 
     @Test
diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/AbstractLoginPresenterWidget.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/AbstractLoginPresenterWidget.java
deleted file mode 100644
index 646aec0..0000000
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/AbstractLoginPresenterWidget.java
+++ /dev/null
@@ -1,215 +0,0 @@
-package org.ovirt.engine.ui.common.presenter;
-
-import java.util.logging.Logger;
-
-import org.ovirt.engine.ui.common.system.ClientStorage;
-import org.ovirt.engine.ui.common.system.LockInteractionManager;
-import org.ovirt.engine.ui.common.uicommon.model.DeferredModelCommandInvoker;
-import org.ovirt.engine.ui.common.widget.HasEditorDriver;
-import org.ovirt.engine.ui.common.widget.HasUiCommandClickHandlers;
-import org.ovirt.engine.ui.uicommonweb.UICommand;
-import org.ovirt.engine.ui.uicommonweb.models.LoginModel;
-import org.ovirt.engine.ui.uicompat.Event;
-import org.ovirt.engine.ui.uicompat.EventArgs;
-import org.ovirt.engine.ui.uicompat.IEventListener;
-import org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs;
-
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.event.dom.client.HasKeyPressHandlers;
-import com.google.gwt.event.dom.client.KeyCodes;
-import com.google.gwt.event.dom.client.KeyPressEvent;
-import com.google.gwt.event.dom.client.KeyPressHandler;
-import com.google.gwt.event.shared.EventBus;
-import com.google.gwt.safehtml.shared.SafeHtml;
-import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
-import com.google.gwt.safehtml.shared.SafeHtmlUtils;
-import com.google.gwt.safehtml.shared.UriUtils;
-import com.gwtplatform.mvp.client.PresenterWidget;
-import com.gwtplatform.mvp.client.View;
-
-/**
- * Base class for login presenter widgets.
- *
- * @param <T>
- *            Login model type.
- * @param <V>
- *            View type.
- */
-public abstract class AbstractLoginPresenterWidget<T extends LoginModel, V 
extends AbstractLoginPresenterWidget.ViewDef<T>> extends PresenterWidget<V> {
-
-    public interface ViewDef<T extends LoginModel> extends View, 
HasEditorDriver<T> {
-
-        void resetAndFocus();
-
-        void setErrorMessageHtml(SafeHtml text);
-
-        void clearErrorMessage();
-
-        HasUiCommandClickHandlers getLoginButton();
-
-        HasKeyPressHandlers getLoginForm();
-
-        String getMotdAnchorHtml(String url);
-
-        T flush();
-
-        void fireChangeEventsOnFields();
-    }
-
-    private static final Logger logger = 
Logger.getLogger(AbstractLoginPresenterWidget.class.getName());
-
-    private final ClientStorage clientStorage;
-    private final LockInteractionManager lockInteractionManager;
-
-    private DeferredModelCommandInvoker modelCommandInvoker;
-
-    public AbstractLoginPresenterWidget(EventBus eventBus, V view, T 
loginModel,
-            ClientStorage clientStorage, LockInteractionManager 
lockInteractionManager) {
-        super(eventBus, view);
-        this.clientStorage = clientStorage;
-        this.lockInteractionManager = lockInteractionManager;
-        getView().edit(loginModel);
-    }
-
-    @Override
-    protected void onBind() {
-        super.onBind();
-
-        final T loginModel = getView().flush();
-
-        // Set up model command invoker
-        this.modelCommandInvoker = new DeferredModelCommandInvoker(loginModel) 
{
-            @Override
-            protected void executeCommand(UICommand command) {
-                if (command == loginModel.getLoginCommand()) {
-                    beforeLoginCommandExecuted(loginModel);
-                }
-                super.executeCommand(command);
-            }
-        };
-
-        loginModel.getLoggedInEvent().addListener(new 
IEventListener<EventArgs>() {
-            @Override
-            public void eventRaised(Event<? extends EventArgs> ev, Object 
sender, EventArgs args) {
-                onLoggedInEvent(loginModel);
-            }
-        });
-
-        loginModel.getLoginFailedEvent().addListener(new 
IEventListener<EventArgs>() {
-            @Override
-            public void eventRaised(Event<? extends EventArgs> ev, Object 
sender, EventArgs args) {
-                lockInteractionManager.hideLoadingIndicator();
-                formatAndSetErrorMessage(loginModel.getMessage());
-                logger.warning("Login failed for user [" + 
loginModel.getUserName().getEntity() + "]"); //$NON-NLS-1$ //$NON-NLS-2$
-            }
-
-        });
-
-        getView().getLoginButton().setCommand(loginModel.getLoginCommand());
-        registerHandler(getView().getLoginButton().addClickHandler(new 
ClickHandler() {
-            @Override
-            public void onClick(ClickEvent event) {
-                // force fire change events in case the login form was filled 
in by an SSO robot or pasted in
-                getView().fireChangeEventsOnFields();
-                getView().flush();
-                modelCommandInvoker.invokeDefaultCommand();
-            }
-        }));
-
-        registerHandler(getView().getLoginForm().addKeyPressHandler(new 
KeyPressHandler() {
-            @Override
-            public void onKeyPress(KeyPressEvent event) {
-                if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) 
{
-                    // force fire change events in case the login form was 
filled in by an SSO robot or pasted in
-                    getView().fireChangeEventsOnFields();
-                    getView().flush();
-                    modelCommandInvoker.invokeDefaultCommand();
-                }
-            }
-        }));
-
-        // Update selected domain after domain items have been set
-        loginModel.getProfile().getPropertyChangedEvent().addListener(new 
IEventListener<PropertyChangedEventArgs>() {
-            @SuppressWarnings("unchecked")
-            @Override
-            public void eventRaised(Event<? extends PropertyChangedEventArgs> 
ev, Object sender, PropertyChangedEventArgs args) {
-                if (!"Items".equals(args.propertyName)) {//$NON-NLS-1$
-                    return;
-                }
-
-                String previouslySelectedItem = 
clientStorage.getLocalItem(getSelectedDomainKey());
-                if (previouslySelectedItem == null || 
"".equals(previouslySelectedItem)) { //$NON-NLS-1$
-                    return;
-                }
-
-                for (String item : loginModel.getProfile().getItems()) {
-                    if (previouslySelectedItem.equals(item)) {
-                        loginModel.getProfile().setSelectedItem(item);
-                        break;
-                    }
-                }
-            }
-        });
-    }
-
-    /**
-     * Actions taken before executing 'Login' command that initiates UiCommon 
{@linkplain LoginModel#Login login
-     * operation}.
-     */
-    void beforeLoginCommandExecuted(T loginModel) {
-        lockInteractionManager.showLoadingIndicator();
-    }
-
-    /**
-     * Returns the key used to store and retrieve selected domain from {@link 
ClientStorage}.
-     */
-    protected abstract String getSelectedDomainKey();
-
-    protected void onLoggedInEvent(T loginModel) {
-        getView().clearErrorMessage();
-        saveSelectedDomain(loginModel);
-    }
-
-    void saveSelectedDomain(T loginModel) {
-        String selectedItem = loginModel.getProfile().getSelectedItem();
-        if (selectedItem == null || "".equals(selectedItem)) { //$NON-NLS-1$
-            return;
-        }
-
-        clientStorage.setLocalItem(getSelectedDomainKey(), selectedItem);
-    }
-
-    private void formatAndSetErrorMessage(String message) {
-        SafeHtml safeMessage = null;
-        if (message != null) {
-            SafeHtmlBuilder builder = new SafeHtmlBuilder();
-            int urlIndex = message.indexOf("http"); //$NON-NLS-1$
-            if (urlIndex != -1) {
-                String beforeURL = message.substring(0, urlIndex);
-                int afterUrlMessageIndex = message.indexOf(" ", urlIndex); 
//$NON-NLS-1$
-                int endIndex = afterUrlMessageIndex > -1 ? 
afterUrlMessageIndex : message.length();
-                //Sanitize the URL, returns # if it is not safe.
-                String url = UriUtils.sanitizeUri(message.substring(urlIndex, 
endIndex));
-                String motdAnchor = getView().getMotdAnchorHtml(url);
-                
builder.appendEscaped(beforeURL).append(SafeHtmlUtils.fromTrustedString(motdAnchor));
-                if (endIndex < message.length()) {
-                    //There was a string after the URL append it as well.
-                    builder.appendEscaped(message.substring(endIndex));
-                }
-            } else {
-                builder.appendEscaped(message);
-            }
-            safeMessage = builder.toSafeHtml();
-        }
-        getView().setErrorMessageHtml(safeMessage);
-    }
-
-    @Override
-    protected void onReset() {
-        super.onReset();
-
-        getView().resetAndFocus();
-    }
-
-}
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/LoginModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/LoginModel.java
index 071566f..73a8e11 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/LoginModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/LoginModel.java
@@ -3,12 +3,10 @@
 import java.util.Collections;
 import java.util.List;
 
-import org.ovirt.engine.core.common.action.VdcReturnValueBase;
 import org.ovirt.engine.core.common.businessentities.aaa.DbUser;
 import org.ovirt.engine.ui.frontend.AsyncQuery;
 import org.ovirt.engine.ui.frontend.Frontend;
 import org.ovirt.engine.ui.frontend.INewAsyncCallback;
-import org.ovirt.engine.ui.uicommonweb.Linq;
 import org.ovirt.engine.ui.uicommonweb.UICommand;
 import org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider;
 import org.ovirt.engine.ui.uicommonweb.validation.IValidation;
@@ -49,18 +47,6 @@
     private void setLoginFailedEvent(Event<EventArgs> value)
     {
         privateLoginFailedEvent = value;
-    }
-
-    private UICommand privateLoginCommand;
-
-    public UICommand getLoginCommand()
-    {
-        return privateLoginCommand;
-    }
-
-    public void setLoginCommand(UICommand value)
-    {
-        privateLoginCommand = value;
     }
 
     private ListModel<String> privateProfile;
@@ -151,12 +137,6 @@
         setLoggedInEvent(new Event<EventArgs>(loggedInEventDefinition));
         setLoginFailedEvent(new Event<EventArgs>(loginFailedEventDefinition));
 
-        UICommand tempVar = new UICommand("Login", this); //$NON-NLS-1$
-        tempVar.setIsExecutionAllowed(false);
-        tempVar.setIsDefault(true);
-        setLoginCommand(tempVar);
-        getCommands().add(tempVar);
-
         setProfile(new ListModel<String>());
         getProfile().setIsChangable(false);
         setUserName(new EntityModel<String>());
@@ -192,7 +172,6 @@
                     // Don't enable the screen when we are in the process of 
logging in automatically.
                     // If this happens to be executed before the AutoLogin() 
is executed,
                     // it is not a problem, as the AutoLogin() will disable 
the screen by itself.
-                    loginModel.getLoginCommand().setIsExecutionAllowed(true);
                     loginModel.getUserName().setIsChangable(true);
                     loginModel.getPassword().setIsChangable(true);
                     loginModel.getProfile().setIsChangable(true);
@@ -205,57 +184,6 @@
             }
         };
         
AsyncDataProvider.getInstance().getAAAProfilesListViaPublic(_asyncQuery, true);
-    }
-
-    public void login()
-    {
-        if (!validate())
-        {
-            getLoginFailedEvent().raise(this, EventArgs.EMPTY);
-            return;
-        }
-
-        startProgress(null);
-        disableLoginScreen();
-
-        AsyncQuery _asyncQuery = new AsyncQuery();
-        _asyncQuery.setModel(this);
-        _asyncQuery.asyncCallback = new INewAsyncCallback() {
-            @Override
-            public void onSuccess(Object model, Object result)
-            {
-                LoginModel loginModel = (LoginModel) model;
-                DbUser user = null;
-                if (result != null)
-                {
-                    VdcReturnValueBase returnValue = (VdcReturnValueBase) 
result;
-                    if (returnValue.getSucceeded())
-                    {
-                        user = (DbUser) returnValue.getActionReturnValue();
-                        loginModel.setLoggedUser(user);
-                    }
-                    if (user == null)
-                    {
-                        loginModel.getPassword().setEntity(""); //$NON-NLS-1$
-                        
loginModel.setMessage(Linq.firstOrDefault(returnValue.getCanDoActionMessages()));
-                        loginModel.getUserName().setIsChangable(true);
-                        loginModel.getPassword().setIsChangable(true);
-                        loginModel.getProfile().setIsChangable(true);
-                        
loginModel.getLoginCommand().setIsExecutionAllowed(true);
-                        loginModel.getLoginFailedEvent().raise(this, 
EventArgs.EMPTY);
-                    }
-                    else
-                    {
-                        raiseLoggedInEvent();
-                    }
-                    stopProgress();
-                }
-            }
-        };
-
-        // run the login
-        Frontend.getInstance().loginAsync(getUserName().getEntity(), 
getPassword().getEntity(),
-                getProfile().getSelectedItem(), true, _asyncQuery);
     }
 
     protected void raiseLoggedInEvent() {
@@ -278,7 +206,6 @@
         getUserName().setIsChangable(false);
         getPassword().setIsChangable(false);
         getProfile().setIsChangable(false);
-        getLoginCommand().setIsExecutionAllowed(false);
     }
 
     protected boolean validate()
@@ -295,11 +222,7 @@
     {
         super.executeCommand(command);
 
-        if (command == getLoginCommand())
-        {
-            login();
-        }
-        else if ("Cancel".equals(command.getName())) //$NON-NLS-1$
+        if ("Cancel".equals(command.getName())) //$NON-NLS-1$
         {
             cancel();
         }
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalLoginModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalLoginModel.java
index 9c97088..8a3c1d2 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalLoginModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalLoginModel.java
@@ -2,7 +2,6 @@
 
 import java.util.ArrayList;
 
-import org.ovirt.engine.core.common.action.VdcReturnValueBase;
 import org.ovirt.engine.core.common.businessentities.ActionGroup;
 import org.ovirt.engine.core.common.businessentities.Permissions;
 import org.ovirt.engine.core.common.businessentities.aaa.DbUser;
@@ -14,12 +13,10 @@
 import org.ovirt.engine.ui.frontend.AsyncQuery;
 import org.ovirt.engine.ui.frontend.Frontend;
 import org.ovirt.engine.ui.frontend.INewAsyncCallback;
-import org.ovirt.engine.ui.uicommonweb.Linq;
 import org.ovirt.engine.ui.uicommonweb.auth.ApplicationGuids;
 import org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider;
 import org.ovirt.engine.ui.uicommonweb.models.EntityModel;
 import org.ovirt.engine.ui.uicommonweb.models.LoginModel;
-import org.ovirt.engine.ui.uicompat.EventArgs;
 import org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult;
 import org.ovirt.engine.ui.uicompat.IFrontendMultipleQueryAsyncCallback;
 
@@ -110,54 +107,6 @@
         EntityModel<Boolean> tempVar2 = new EntityModel<Boolean>();
         tempVar2.setEntity(true);
         setIsAutoConnect(tempVar2);
-    }
-
-    @Override
-    public void login()
-    {
-        // Completely override the base class functionality.
-        if (!validate())
-        {
-            getLoginFailedEvent().raise(this, EventArgs.EMPTY);
-            return;
-        }
-
-        startProgress(null);
-
-        getUserName().setIsChangable(false);
-        getPassword().setIsChangable(false);
-        getProfile().setIsChangable(false);
-        getLoginCommand().setIsExecutionAllowed(false);
-        getIsAutoConnect().setIsChangable(false);
-
-        AsyncQuery asyncQuery = new AsyncQuery();
-        asyncQuery.setModel(this);
-        asyncQuery.asyncCallback = new INewAsyncCallback() {
-            @Override
-            public void onSuccess(final Object model, final Object result) {
-                UserPortalLoginModel loginModel = (UserPortalLoginModel) model;
-                VdcReturnValueBase returnValue = (VdcReturnValueBase) result;
-                boolean success = returnValue != null && 
returnValue.getSucceeded();
-                if (success) {
-                    loginModel.setLoggedUser((DbUser) 
returnValue.getActionReturnValue());
-                    loginModel.raiseLoggedInEvent();
-                } else {
-                    loginModel.getPassword().setEntity(""); //$NON-NLS-1$
-                    if (returnValue != null) {
-                        
loginModel.setMessage(Linq.firstOrDefault(returnValue.getCanDoActionMessages()));
-                    }
-                    loginModel.getUserName().setIsChangable(true);
-                    loginModel.getPassword().setIsChangable(true);
-                    loginModel.getProfile().setIsChangable(true);
-                    loginModel.getLoginCommand().setIsExecutionAllowed(true);
-                    getIsAutoConnect().setIsChangable(true);
-                    loginModel.getLoginFailedEvent().raise(this, 
EventArgs.EMPTY);
-                }
-                stopProgress();
-            }
-        };
-        Frontend.getInstance().loginAsync(getUserName().getEntity(), 
getPassword().getEntity(),
-                                          getProfile().getSelectedItem(), 
false, asyncQuery);
     }
 
     // Update IsENGINEUser flag.
diff --git 
a/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/web.xml 
b/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/web.xml
index bbde075..81d862b 100644
--- a/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/web.xml
+++ b/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/web.xml
@@ -71,15 +71,6 @@
     </filter-mapping>
 
     <filter>
-        <filter-name>LoginFilter</filter-name>
-        
<filter-class>org.ovirt.engine.core.aaa.filters.LoginFilter</filter-class>
-    </filter>
-    <filter-mapping>
-        <filter-name>LoginFilter</filter-name>
-        <url-pattern>/*</url-pattern>
-    </filter-mapping>
-
-    <filter>
         <filter-name>SessionMgmtFilter</filter-name>
         
<filter-class>org.ovirt.engine.core.aaa.filters.SessionMgmtFilter</filter-class>
     </filter>
diff --git a/frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/web.xml 
b/frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/web.xml
index 41f2dc7..fdc8718 100644
--- a/frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/web.xml
+++ b/frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/web.xml
@@ -72,18 +72,6 @@
     </filter-mapping>
 
     <filter>
-        <filter-name>LoginFilter</filter-name>
-        
<filter-class>org.ovirt.engine.core.aaa.filters.LoginFilter</filter-class>
-        <init-param>
-            <param-name>login-as-admin</param-name>
-            <param-value>true</param-value>
-        </init-param>
-    </filter>
-    <filter-mapping>
-        <filter-name>LoginFilter</filter-name>
-        <url-pattern>/*</url-pattern>
-    </filter-mapping>
-    <filter>
         <filter-name>SessionMgmtFilter</filter-name>
         
<filter-class>org.ovirt.engine.core.aaa.filters.SessionMgmtFilter</filter-class>
     </filter>


-- 
To view, visit https://gerrit.ovirt.org/38390
To unsubscribe, visit https://gerrit.ovirt.org/settings

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

Reply via email to