Added skeleton for basic admin auth system
This commit is contained in:
+2
-2
@@ -18,7 +18,7 @@ type Config struct {
|
||||
func Load(path string) Config {
|
||||
configData := Config{
|
||||
SiteName: "Unnamed Download Listing",
|
||||
Port: "8080",
|
||||
Port: ":8080",
|
||||
DataDir: "data",
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ func Save(path string, configData Config) error {
|
||||
if configData.AdminUser != "" {
|
||||
file.WriteString("admin_user = \"" + configData.AdminUser + "\"\n")
|
||||
file.WriteString("admin_password_hash = \"" + configData.AdminPasswordHash + "\"\n")
|
||||
file.WriteString("# This admin_password_hash above is a hashed password, not your actual\"")
|
||||
file.WriteString("# This admin_password_hash above is a hashed password, not your actual\n")
|
||||
file.WriteString("# written password. You can't change your admin password here.\n")
|
||||
file.WriteString("# If you've lost your password, delete admin_user and admin_hash\n")
|
||||
file.WriteString("# from this file and restart the app to create a new account.\n")
|
||||
|
||||
Reference in New Issue
Block a user