mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
add a setup screen to create the first admin user
If you prefer to auto-create the first admin you can enable the "create_default_admin" configuration key and SFTPGo will work as before. You can also create the first admin by loading initial data: now you can set both username and password, before you could only change the password
This commit is contained in:
@@ -60,6 +60,7 @@ func TestMain(m *testing.M) {
|
||||
logFilePath := filepath.Join(configDir, "common_test.log")
|
||||
logger.InitLogger(logFilePath, 5, 1, 28, false, zerolog.DebugLevel)
|
||||
|
||||
os.Setenv("SFTPGO_DATA_PROVIDER__CREATE_DEFAULT_ADMIN", "1")
|
||||
err := config.LoadConfig(configDir, "")
|
||||
if err != nil {
|
||||
logger.ErrorToConsole("error loading configuration: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user