Skip to content

Commit

Permalink
Update rules #19 #21 #23 #24
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Aug 21, 2016
1 parent 2252d63 commit 95262b4
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,23 @@ type Config struct {

// UserConfig contains the configuration for each user
type UserConfig struct {
PathScope string
Root http.FileSystem
StyleSheet string // Costum stylesheet
FrontMatter string // Default frontmatter to save files in
AllowNew bool // Can create files and folders
AllowEdit bool // Can edit/rename files

Allow []string // Allowed browse directories/files
AllowRegex []*regexp.Regexp // Regex of the previous
Block []string // Blocked browse directories/files
BlockRegex []*regexp.Regexp // Regex of the previous

AllowCommands bool // Can execute commands
AllowedCommands []string // Allowed commands
BlockedCommands []string // Blocked Commands
PathScope string
Root http.FileSystem
StyleSheet string // Costum stylesheet
FrontMatter string // Default frontmatter to save files in
AllowNew bool // Can create files and folders
AllowEdit bool // Can edit/rename files
AllowCommands bool // Can execute commands
Commands []string // Available Commands
Rules []*Rule // Access rules
}

// Rule is a dissalow/allow rule
type Rule struct {
Regex bool
Allow bool
Path string
Rexexp *regexp.Regexp
}

// Parse parses the configuration set by the user so it can
Expand Down

0 comments on commit 95262b4

Please sign in to comment.