mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2024-11-14 03:20:14 +01:00
Update InitialSecuritySetup.java
This commit is contained in:
parent
811c19e00d
commit
dcf13e9ade
@ -33,6 +33,7 @@ public class InitialSecuritySetup {
|
|||||||
applicationProperties.getSecurity().getInitialLogin().getUsername();
|
applicationProperties.getSecurity().getInitialLogin().getUsername();
|
||||||
String initialPassword =
|
String initialPassword =
|
||||||
applicationProperties.getSecurity().getInitialLogin().getPassword();
|
applicationProperties.getSecurity().getInitialLogin().getPassword();
|
||||||
|
if (initialUsername != null && initialPassword != null) {
|
||||||
try {
|
try {
|
||||||
// https://github.com/Stirling-Tools/Stirling-PDF/issues/976
|
// https://github.com/Stirling-Tools/Stirling-PDF/issues/976
|
||||||
userService.isUsernameValidWithReturn(initialUsername);
|
userService.isUsernameValidWithReturn(initialUsername);
|
||||||
@ -47,7 +48,6 @@ public class InitialSecuritySetup {
|
|||||||
}
|
}
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
if (initialUsername != null && initialPassword != null) {
|
|
||||||
userService.saveUser(initialUsername, initialPassword, Role.ADMIN.getRoleId());
|
userService.saveUser(initialUsername, initialPassword, Role.ADMIN.getRoleId());
|
||||||
} else {
|
} else {
|
||||||
initialUsername = "admin";
|
initialUsername = "admin";
|
||||||
|
Loading…
Reference in New Issue
Block a user