Update InitialSecuritySetup.java
This commit is contained in:
parent
811c19e00d
commit
dcf13e9ade
1 changed files with 14 additions and 14 deletions
|
@ -33,6 +33,7 @@ public class InitialSecuritySetup {
|
|||
applicationProperties.getSecurity().getInitialLogin().getUsername();
|
||||
String initialPassword =
|
||||
applicationProperties.getSecurity().getInitialLogin().getPassword();
|
||||
if (initialUsername != null && initialPassword != null) {
|
||||
try {
|
||||
// https://github.com/Stirling-Tools/Stirling-PDF/issues/976
|
||||
userService.isUsernameValidWithReturn(initialUsername);
|
||||
|
@ -47,7 +48,6 @@ public class InitialSecuritySetup {
|
|||
}
|
||||
throw e;
|
||||
}
|
||||
if (initialUsername != null && initialPassword != null) {
|
||||
userService.saveUser(initialUsername, initialPassword, Role.ADMIN.getRoleId());
|
||||
} else {
|
||||
initialUsername = "admin";
|
||||
|
|
Loading…
Reference in a new issue