updated scope

This commit is contained in:
Graham Steffaniak 2023-09-03 17:16:49 -05:00
parent 50eda21dbc
commit 10e4f4196a
3 changed files with 6 additions and 2 deletions

View File

@ -5,9 +5,10 @@ auth:
method: noauth method: noauth
signup: true signup: true
userDefaults: userDefaults:
scope: "."
hideDotfiles: true hideDotfiles: true
singleClick: false singleClick: false
perm: permissions:
admin: false admin: false
create: true create: true
rename: true rename: true

View File

@ -17,6 +17,7 @@ func Initialize(configFile string) {
if err != nil { if err != nil {
log.Fatalf("Error unmarshaling YAML data: %v", err) log.Fatalf("Error unmarshaling YAML data: %v", err)
} }
GlobalConfiguration.UserDefaults.Perm = GlobalConfiguration.UserDefaults.Permissions
GlobalConfiguration.Server.Root = "/srv" // hardcoded for now. TODO allow changing GlobalConfiguration.Server.Root = "/srv" // hardcoded for now. TODO allow changing
} }
@ -65,9 +66,10 @@ func setDefaults() Settings {
}, },
}, },
UserDefaults: UserDefaults{ UserDefaults: UserDefaults{
Scope: ".",
LockPassword: false, LockPassword: false,
HideDotfiles: true, HideDotfiles: true,
Perm: users.Permissions{ Permissions: users.Permissions{
Create: true, Create: true,
Rename: true, Rename: true,
Modify: true, Modify: true,

View File

@ -90,6 +90,7 @@ type UserDefaults struct {
Asc bool `json:"asc"` Asc bool `json:"asc"`
} `json:"sorting"` } `json:"sorting"`
Perm users.Permissions `json:"perm"` Perm users.Permissions `json:"perm"`
Permissions users.Permissions `json:"permissions"`
Commands []string `json:"commands"` Commands []string `json:"commands"`
HideDotfiles bool `json:"hideDotfiles"` HideDotfiles bool `json:"hideDotfiles"`
DateFormat bool `json:"dateFormat"` DateFormat bool `json:"dateFormat"`