Commit dba1e9e
Silvio Tomatis
·
2026-10-30 20:12:10 -0400 EDT
parent bdd5983
pgs: document http-pass acl type in acl help and validation error (#224) The acl command already accepts --type http-pass (password login form), but the -type flag help and the validation error omitted it. Also note that for http-pass the -acl value is the password.
2 files changed,
+4,
-4
+1,
-1
| ... | ... | @@ -236,7 +236,7 @@ This means only you can access the site through a web tunnel or by downloading t | |
| 236 | 236 | }, | |
| 237 | 237 | { | |
| 238 | 238 | fmt.Sprintf("acl %s", projectName), | |
| 239 | - | "Access control for project", | |
| 239 | + | "Access control for project (--type public, pico, pubkeys, http-pass)", | |
| 240 | 240 | }, | |
| 241 | 241 | { | |
| 242 | 242 | fmt.Sprintf("cache %s", projectName), |
+3,
-3
| ... | ... | @@ -239,12 +239,12 @@ func Middleware(handler *UploadAssetHandler) pssh.SSHServerMiddleware { | |
| 239 | 239 | return err | |
| 240 | 240 | case "acl": | |
| 241 | 241 | aclCmd, write := flagSet("acl", sesh) | |
| 242 | - | aclType := aclCmd.String("type", "", "access type: public, pico, pubkeys") | |
| 242 | + | aclType := aclCmd.String("type", "", "access type: public, pico, pubkeys, http-pass") | |
| 243 | 243 | var acls arrayFlags | |
| 244 | 244 | aclCmd.Var( | |
| 245 | 245 | &acls, | |
| 246 | 246 | "acl", | |
| 247 | - | "list of pico usernames or sha256 public keys, delimited by commas", | |
| 247 | + | "list of pico usernames or sha256 public keys, delimited by commas (for http-pass: the password)", | |
| 248 | 248 | ) | |
| 249 | 249 | if !flagCheck(aclCmd, projectName, cmdArgs) { | |
| 250 | 250 | return nil |
| ... | ... | @@ -253,7 +253,7 @@ func Middleware(handler *UploadAssetHandler) pssh.SSHServerMiddleware { | |
| 253 | 253 | ||
| 254 | 254 | if !slices.Contains([]string{"public", "pubkeys", "pico", "http-pass"}, *aclType) { | |
| 255 | 255 | err := fmt.Errorf( | |
| 256 | - | "acl type must be one of the following: [public, pubkeys, pico], found %s", | |
| 256 | + | "acl type must be one of the following: [public, pubkeys, pico, http-pass], found %s", | |
| 257 | 257 | *aclType, | |
| 258 | 258 | ) | |
| 259 | 259 | opts.bail(err) |