Fixes: U4-3821 Infinite redirect loop when upgrading from 7.0.0 to 7.0.1 and ensures media cache is rebuilt on upgrade

This commit is contained in:
Shannon
2013-12-10 11:51:03 +11:00
parent bffe52e060
commit eaac76cdc1
9 changed files with 108 additions and 28 deletions

View File

@@ -0,0 +1,32 @@
/**
* @ngdoc controller
* @name Umbraco.MainController
* @function
*
* @description
* The controller for the AuthorizeUpgrade login page
*
*/
function AuthorizeUpgradeController($scope, $window) {
//Add this method to the scope - this method will be called by the login dialog controller when the login is successful
// then we'll handle the redirect.
$scope.submit = function (event) {
var qry = $window.location.search.trimStart("?").split("&");
var redir = _.find(qry, function(item) {
return item.startsWith("redir=");
});
if (redir) {
$window.location = decodeURIComponent(redir.split("=")[1]);
}
else {
$window.location = "/";
}
};
}
angular.module('umbraco').controller("Umbraco.AuthorizeUpgradeController", AuthorizeUpgradeController);

View File

@@ -35,7 +35,7 @@
userService.authenticate(login, password)
.then(function (data) {
$scope.submit(true);
$scope.submit(true);
}, function (reason) {
$scope.errorMsg = reason.errorMsg;