This commit is contained in:
2018-08-28 00:03:06 +00:00
parent 82bd65cf49
commit b60dc75c8e
9 changed files with 85 additions and 17 deletions

View File

@@ -41,7 +41,7 @@ namespace AyaNova
_hostingEnvironment = hostingEnvironment;
AyaNova.Util.ApplicationLogging.LoggerFactory = logFactory;
//this must be set here
ServerBootConfig.AYANOVA_CONTENT_ROOT_PATH=hostingEnvironment.ContentRootPath;
ServerBootConfig.AYANOVA_CONTENT_ROOT_PATH = hostingEnvironment.ContentRootPath;
}
@@ -337,10 +337,11 @@ namespace AyaNova
var ct = context.RequestServices.GetService<AyContext>();
//get the user record
var u = ct.User.AsNoTracking().Where(a => a.Id == userId).Select(m => new { roles = m.Roles, name = m.Name, Id = m.Id }).First();
var u = ct.User.AsNoTracking().Where(a => a.Id == userId).Select(m => new { roles = m.Roles, name = m.Name, Id = m.Id, LocaleId = m.LocaleId }).First();
context.Request.HttpContext.Items["AY_ROLES"] = u.roles;
context.Request.HttpContext.Items["AY_USERNAME"] = u.name;
context.Request.HttpContext.Items["AY_USER_ID"] = u.Id;
context.Request.HttpContext.Items["AY_LOCALE_ID"] = u.LocaleId;
}
await next.Invoke();
});
@@ -384,13 +385,13 @@ namespace AyaNova
// AyaNova.Core.License.Initialize(apiServerState, dbContext, _log);
// AyaNova.Core.License.Fetch(apiServerState, dbContext, _log);
// Util.Seeder.SeedDatabase(dbContext, Util.Seeder.SeedLevel.SmallOneManShopTrialDataSet);
#endif
//Open up the server for visitors
apiServerState.SetOpen();