GUAC-1126: Query home page directly when logging in. Do not rely on redirect from '/'.
This commit is contained in:
1 parent
9c7e98c97e
commit
ca8379d938
1 file changed
+5
-1
@@ -26,6 +26,7 @@ angular.module('login').controller('loginController', ['$scope', '$injector',
|
||||
// Required services
|
||||
var $location = $injector.get("$location");
|
||||
var authenticationService = $injector.get("authenticationService");
|
||||
var userPageService = $injector.get('userPageService');
|
||||
|
||||
/**
|
||||
* Whether an error occurred during login.
|
||||
@@ -52,7 +53,10 @@ angular.module('login').controller('loginController', ['$scope', '$injector',
|
||||
|
||||
// Redirect to main view upon success
|
||||
.success(function success(data, status, headers, config) {
|
||||
$location.path('/');
|
||||
userPageService.getHomePage()
|
||||
.then(function homePageRetrieved(homePage) {
|
||||
$location.url(homePage.url);
|
||||
});
|
||||
})
|
||||
|
||||
// Reset and focus password upon failure
|
||||
|
||||
Reference in new issue
Block a user