You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by GitBox <gi...@apache.org> on 2021/06/03 14:55:55 UTC

[GitHub] [brooklyn-ui] duncangrant commented on a change in pull request #211: Login page fixes - WIP - please do not merge

duncangrant commented on a change in pull request #211:
URL: https://github.com/apache/brooklyn-ui/pull/211#discussion_r644865960



##########
File path: ui-modules/login/app/views/main/main.controller.js
##########
@@ -47,18 +47,28 @@ export function loginStateController($scope, $http, $window, brBrandInfo) {
     $scope.$emit(HIDE_INTERSTITIAL_SPINNER_EVENT);
     $scope.getBrandedText = brBrandInfo.getBrandedText;
 
+    let loginController = this;
+    loginController.error = {};
+
+    var testAuthReq = {
+        method: 'HEAD',
+        url: '/v1/server/up/extended'
+    }
+
+    // If the user is already logged in then redirect to home
+    $http(testAuthReq).then( () => {$window.location.href = '/';} );

Review comment:
       I think that there is a more angularjs way to redirect but I'm not sure I understand what it is.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org