]> OzVa Git service - ozva-cloud/commitdiff
chore: update description for `--auth`
authorsigoden <sigoden@gmail.com>
Fri, 3 Nov 2023 13:08:05 +0000 (21:08 +0800)
committersigoden <sigoden@gmail.com>
Fri, 3 Nov 2023 13:08:05 +0000 (21:08 +0800)
README.md
src/args.rs

index e8b45dd635084730f4ee6ff47d9e9107acc9e37b..25c5a23063b626e1503c98ab79609cebf8431f9a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -58,7 +58,7 @@ Options:
   -p, --port <port>          Specify port to listen on [default: 5000]
       --path-prefix <path>   Specify a path prefix
       --hidden <value>       Hide paths from directory listings, separated by `,`
-  -a, --auth <rules>         Add auth role
+  -a, --auth <rules>         Add auth roles, e.g. user:pass@/dir1:rw,/dir2
   -A, --allow-all            Allow all operations
       --allow-upload         Allow upload files/folders
       --allow-delete         Allow delete files/folders
@@ -205,7 +205,8 @@ curl http://192.168.8.10:5000/file --user user:pass --digest        # digest aut
 Dufs supports account based access control. You can control who can do what on which path with `--auth`/`-a`.
 
 ```
-dufs -a [user:pass]@path[:rw][,path[:rw]...][|...]
+dufs -a user:pass@path1:rw,path2|user2:pass2@path1
+dufs -a user:pass@path1:rw,path2 -a user2:pass2@path1
 ```
 
 1. Multiple rules are separated by "|"
index 8472fe9478c7ff284536dee3c8bca4d971b36aa1..8d4da3efdcc2d364310022f90f016e9890bbdb2a 100644 (file)
@@ -75,7 +75,7 @@ pub fn build_cli() -> Command {
                                .hide_env(true)
                 .short('a')
                 .long("auth")
-                .help("Add auth role")
+                .help("Add auth roles, e.g. user:pass@/dir1:rw,/dir2")
                 .action(ArgAction::Append)
                 .value_delimiter('|')
                 .value_name("rules"),