Fix installing packages.
This commit is contained in:
@@ -44,15 +44,6 @@ namespace Umbraco.Cms.Web.BackOffice.Filters
|
||||
|
||||
public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
|
||||
{
|
||||
if (context.Controller is ControllerBase controller && controller.User.Identity is ClaimsIdentity userIdentity)
|
||||
{
|
||||
// if there is not CookiePath claim, then exit
|
||||
if (userIdentity.HasClaim(x => x.Type == ClaimTypes.CookiePath) == false)
|
||||
{
|
||||
await next();
|
||||
}
|
||||
}
|
||||
|
||||
var cookieToken = _cookieManager.GetCookieValue(Constants.Web.CsrfValidationCookieName);
|
||||
var httpContext = context.HttpContext;
|
||||
|
||||
|
||||
@@ -146,13 +146,14 @@
|
||||
|
||||
//check if the app domain is restarted ever 2 seconds
|
||||
var count = 0;
|
||||
var maxCount = 5;
|
||||
|
||||
function checkRestart() {
|
||||
$timeout(function () {
|
||||
packageResource.checkRestart(pack).then(function (d) {
|
||||
count++;
|
||||
//if there is an id it means it's not restarted yet but we'll limit it to only check 10 times
|
||||
if (d.isRestarting && count < 10) {
|
||||
if (d.isRestarting && count < maxCount) {
|
||||
checkRestart();
|
||||
}
|
||||
else {
|
||||
@@ -160,9 +161,16 @@
|
||||
deferred.resolve(d);
|
||||
}
|
||||
},
|
||||
installError);
|
||||
function(){
|
||||
if(count >= maxCount){
|
||||
installError();
|
||||
}
|
||||
else {
|
||||
checkRestart();
|
||||
}
|
||||
});
|
||||
},
|
||||
2000);
|
||||
2000*(count+1));
|
||||
}
|
||||
|
||||
checkRestart();
|
||||
|
||||
Reference in New Issue
Block a user