rc: methods marked as AuthRequired need auth unless --rc-no-auth

Methods which can read or mutate external storage will require
authorisation - enforce this.  This can be overidden by `--rc-no-auth`.
This commit is contained in:
Nick Craig-Wood
2018-11-03 16:37:09 +00:00
parent 181267e20e
commit fa0a9653d2
8 changed files with 102 additions and 4 deletions

View File

@@ -21,6 +21,7 @@ type Options struct {
Enabled bool // set to enable the server
Serve bool // set to serve files from remotes
Files string // set to enable serving files locally
NoAuth bool // set to disable auth checks on AuthRequired methods
}
// DefaultOpt is the default values used for Options