Fixes: U4-7467 Umbraco 7.3.2 Clean install, OWIN error after database creation and bumps version

This commit is contained in:
Shannon
2015-11-27 21:23:24 +01:00
parent eae74b0e20
commit 87100feb3d
3 changed files with 26 additions and 32 deletions

View File

@@ -11,5 +11,5 @@ using System.Resources;
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("7.3.1")]
[assembly: AssemblyInformationalVersion("7.3.1")]
[assembly: AssemblyFileVersion("7.3.3")]
[assembly: AssemblyInformationalVersion("7.3.3")]

View File

@@ -2413,7 +2413,7 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.0\x86\*.* "$(TargetDir)x86\"
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>7310</DevelopmentServerPort>
<DevelopmentServerPort>7330</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:7330</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>

View File

@@ -47,9 +47,6 @@ namespace Umbraco.Web.Security.Identity
if (appContext == null) throw new ArgumentNullException("appContext");
if (userMembershipProvider == null) throw new ArgumentNullException("userMembershipProvider");
//Don't proceed if the app is not ready
if (appContext.IsUpgrading == false && appContext.IsConfigured == false) return;
//Configure Umbraco user manager to be created per request
app.CreatePerOwinContext<BackOfficeUserManager>(
(options, owinContext) => BackOfficeUserManager.Create(
@@ -78,9 +75,6 @@ namespace Umbraco.Web.Security.Identity
if (userMembershipProvider == null) throw new ArgumentNullException("userMembershipProvider");
if (customUserStore == null) throw new ArgumentNullException("customUserStore");
//Don't proceed if the app is not ready
if (appContext.IsUpgrading == false && appContext.IsConfigured == false) return;
//Configure Umbraco user manager to be created per request
app.CreatePerOwinContext<BackOfficeUserManager>(
(options, owinContext) => BackOfficeUserManager.Create(
@@ -107,9 +101,6 @@ namespace Umbraco.Web.Security.Identity
if (appContext == null) throw new ArgumentNullException("appContext");
if (userManager == null) throw new ArgumentNullException("userManager");
//Don't proceed if the app is not ready
if (appContext.IsUpgrading == false && appContext.IsConfigured == false) return;
//Configure Umbraco user manager to be created per request
app.CreatePerOwinContext<TManager>(userManager);
@@ -127,10 +118,7 @@ namespace Umbraco.Web.Security.Identity
{
if (app == null) throw new ArgumentNullException("app");
if (appContext == null) throw new ArgumentNullException("appContext");
//Don't proceed if the app is not ready
if (appContext.IsUpgrading == false && appContext.IsConfigured == false) return app;
var authOptions = new UmbracoBackOfficeCookieAuthOptions(
UmbracoConfig.For.UmbracoSettings().Security,
GlobalSettings.TimeOutInMinutes,
@@ -148,19 +136,23 @@ namespace Umbraco.Web.Security.Identity
identity => identity.GetUserId<int>()),
}
};
app.UseUmbracoBackOfficeCookieAuthentication(authOptions, appContext);
//This is a custom middleware, we need to return the user's remaining logged in seconds
app.Use<GetUserSecondsMiddleWare>(
authOptions,
UmbracoConfig.For.UmbracoSettings().Security,
app.CreateLogger<GetUserSecondsMiddleWare>());
app.UseUmbracoBackOfficeCookieAuthentication(authOptions);
//don't apply if app isnot ready
if (appContext.IsUpgrading || appContext.IsConfigured)
{
//This is a custom middleware, we need to return the user's remaining logged in seconds
app.Use<GetUserSecondsMiddleWare>(
authOptions,
UmbracoConfig.For.UmbracoSettings().Security,
app.CreateLogger<GetUserSecondsMiddleWare>());
}
return app;
}
internal static IAppBuilder UseUmbracoBackOfficeCookieAuthentication(this IAppBuilder app, CookieAuthenticationOptions options)
internal static IAppBuilder UseUmbracoBackOfficeCookieAuthentication(this IAppBuilder app, CookieAuthenticationOptions options, ApplicationContext appContext)
{
if (app == null)
{
@@ -170,12 +162,17 @@ namespace Umbraco.Web.Security.Identity
//First the normal cookie middleware
app.Use(typeof(CookieAuthenticationMiddleware), app, options);
app.UseStageMarker(PipelineStage.Authenticate);
//don't apply if app isnot ready
if (appContext.IsUpgrading || appContext.IsConfigured)
{
//Then our custom middlewares
app.Use(typeof(ForceRenewalCookieAuthenticationMiddleware), app, options, new SingletonUmbracoContextAccessor());
app.UseStageMarker(PipelineStage.Authenticate);
app.Use(typeof(FixWindowsAuthMiddlware));
app.UseStageMarker(PipelineStage.Authenticate);
}
//Then our custom middlewares
app.Use(typeof(ForceRenewalCookieAuthenticationMiddleware), app, options, new SingletonUmbracoContextAccessor());
app.UseStageMarker(PipelineStage.Authenticate);
app.Use(typeof(FixWindowsAuthMiddlware));
app.UseStageMarker(PipelineStage.Authenticate);
return app;
}
@@ -192,9 +189,6 @@ namespace Umbraco.Web.Security.Identity
if (app == null) throw new ArgumentNullException("app");
if (appContext == null) throw new ArgumentNullException("appContext");
//Don't proceed if the app is not ready
if (appContext.IsUpgrading == false && appContext.IsConfigured == false) return app;
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = Constants.Security.BackOfficeExternalAuthenticationType,