Skip to content

Commit 2737a25

Browse files
committed
fix: don't point to nil local users in bootstrap app
1 parent 7aa2521 commit 2737a25

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

internal/bootstrap/app_bootstrap.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,12 @@ func (app *BootstrapApp) Setup() error {
9797
return fmt.Errorf("failed to load users: %w", err)
9898
}
9999

100-
app.runtime.LocalUsers = *users
100+
if users != nil {
101+
app.runtime.LocalUsers = *users
102+
} else {
103+
log.App.Debug().Msg("No local users found, local authentication will not be available")
104+
app.runtime.LocalUsers = []model.LocalUser{}
105+
}
101106

102107
// load oauth whitelist
103108
oauthWhitelist, err := utils.GetStringList(app.config.OAuth.Whitelist, app.config.OAuth.WhitelistFile)

0 commit comments

Comments
 (0)