Fixe l'inscription, affiche un avatar par défaut

This commit is contained in:
2017-03-29 10:38:37 +02:00
parent 0a73c16191
commit cbc9a8ac7d
12 changed files with 2074 additions and 54 deletions

View File

@ -302,33 +302,6 @@ namespace Yavsc
else throw ex;
}
}
Task.Run(async () =>
{
// Creates roles when they don't exist
foreach (string roleName in new string[] {Constants.AdminGroupName,
Constants.StarGroupName, Constants.PerformerGroupName,
Constants.FrontOfficeGroupName,
Constants.StarHunterGroupName
})
if (!await roleManager.RoleExistsAsync(roleName))
{
var role = new IdentityRole { Name = roleName };
var resultCreate = await roleManager.CreateAsync(role);
if (!resultCreate.Succeeded)
{
throw new Exception("The role '{roleName}' does not exist and could not be created.");
}
}
// FIXME In a perfect world, connection records should be dropped at shutdown, but:
using (var db = new ApplicationDbContext())
{
foreach (var c in db.Connections)
db.Connections.Remove(c);
db.SaveChanges();
}
});
app.UseIISPlatformHandler(options =>
{