Fix installing packages.

This commit is contained in:
Mole
2021-02-24 12:54:30 +01:00
parent 23f2b091ad
commit 2fcae1cc28
2 changed files with 11 additions and 12 deletions

View File

@@ -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;

View File

@@ -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();