parent
2252d633da
commit
95262b4289
|
@ -25,21 +25,23 @@ type Config struct {
|
||||||
|
|
||||||
// UserConfig contains the configuration for each user
|
// UserConfig contains the configuration for each user
|
||||||
type UserConfig struct {
|
type UserConfig struct {
|
||||||
PathScope string
|
PathScope string
|
||||||
Root http.FileSystem
|
Root http.FileSystem
|
||||||
StyleSheet string // Costum stylesheet
|
StyleSheet string // Costum stylesheet
|
||||||
FrontMatter string // Default frontmatter to save files in
|
FrontMatter string // Default frontmatter to save files in
|
||||||
AllowNew bool // Can create files and folders
|
AllowNew bool // Can create files and folders
|
||||||
AllowEdit bool // Can edit/rename files
|
AllowEdit bool // Can edit/rename files
|
||||||
|
AllowCommands bool // Can execute commands
|
||||||
|
Commands []string // Available Commands
|
||||||
|
Rules []*Rule // Access rules
|
||||||
|
}
|
||||||
|
|
||||||
Allow []string // Allowed browse directories/files
|
// Rule is a dissalow/allow rule
|
||||||
AllowRegex []*regexp.Regexp // Regex of the previous
|
type Rule struct {
|
||||||
Block []string // Blocked browse directories/files
|
Regex bool
|
||||||
BlockRegex []*regexp.Regexp // Regex of the previous
|
Allow bool
|
||||||
|
Path string
|
||||||
AllowCommands bool // Can execute commands
|
Rexexp *regexp.Regexp
|
||||||
AllowedCommands []string // Allowed commands
|
|
||||||
BlockedCommands []string // Blocked Commands
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse parses the configuration set by the user so it can
|
// Parse parses the configuration set by the user so it can
|
||||||
|
|
Loading…
Reference in New Issue