mirror of
				https://github.com/filebrowser/filebrowser.git
				synced 2025-11-04 03:12:57 +00:00 
			
		
		
		
	
							parent
							
								
									2252d633da
								
							
						
					
					
						commit
						95262b4289
					
				@ -31,15 +31,17 @@ type UserConfig struct {
 | 
			
		||||
	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
 | 
			
		||||
	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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user