auth: default admin/admin credentials on first install + bump 1.0.4
SeedAdmin now uses 'admin'/'admin' as defaults when environment variables are not set, so the service works out-of-the-box after first install.
This commit is contained in:
@@ -6,8 +6,11 @@ import (
|
||||
)
|
||||
|
||||
func SeedAdmin(db *sql.DB, username, password string) error {
|
||||
if username == "" || password == "" {
|
||||
return nil
|
||||
if username == "" {
|
||||
username = "admin"
|
||||
}
|
||||
if password == "" {
|
||||
password = "admin"
|
||||
}
|
||||
|
||||
var exists bool
|
||||
|
||||
Reference in New Issue
Block a user