Merge pull request #250 from Moonlight-Panel/ImproveInstallUX
Improved install user experience
This commit is contained in:
commit
388deacf60
3 changed files with 15 additions and 5 deletions
|
@ -112,7 +112,7 @@ public class IdentityService
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
Logger.Warn(
|
Logger.Warn(
|
||||||
$"Cannot find user with the id '{userid}' in the database. Maybe the user has been deleted or a token has been successfully faked by a hacker");
|
$"Cannot find user with the id '{userid}' in the database. Maybe the user has been deleted or a token has been successfully faked by a hacker", "security");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,17 +66,15 @@ public class UserService
|
||||||
{
|
{
|
||||||
throw new DisplayException("The email is already in use");
|
throw new DisplayException("The email is already in use");
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Validation
|
|
||||||
|
|
||||||
// Add user
|
// Add user
|
||||||
var user = UserRepository.Add(new()
|
var user = UserRepository.Add(new()
|
||||||
{
|
{
|
||||||
Address = "",
|
Address = "",
|
||||||
Admin = false,
|
Admin = !UserRepository.Get().Any(),
|
||||||
City = "",
|
City = "",
|
||||||
Country = "",
|
Country = "",
|
||||||
Email = email,
|
Email = email.ToLower(),
|
||||||
Password = BCrypt.Net.BCrypt.HashPassword(password),
|
Password = BCrypt.Net.BCrypt.HashPassword(password),
|
||||||
FirstName = firstname,
|
FirstName = firstname,
|
||||||
LastName = lastname,
|
LastName = lastname,
|
||||||
|
|
|
@ -35,6 +35,18 @@
|
||||||
},
|
},
|
||||||
"applicationUrl": "http://moonlight.testy:5118;https://localhost:7118;http://localhost:5118",
|
"applicationUrl": "http://moonlight.testy:5118;https://localhost:7118;http://localhost:5118",
|
||||||
"dotnetRunMessages": true
|
"dotnetRunMessages": true
|
||||||
|
},
|
||||||
|
"Dev DB 2":
|
||||||
|
{
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||||
|
"ML_DEBUG": "true",
|
||||||
|
"ML_CONFIG_PATH": "storage\\configs\\dev_2_config.json"
|
||||||
|
},
|
||||||
|
"applicationUrl": "http://moonlight.testy:5118;https://localhost:7118;http://localhost:5118",
|
||||||
|
"dotnetRunMessages": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue