mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-09 09:09:03 +03:00
feat: new auth (#218)
The access level path control used by dufs has two disadvantages: 1. One path cannot support multiple users 2. It is very troublesome to set multiple paths for one user So it needs to be refactored. The new auth is account based, it closes #207, closes #208. BREAKING CHANGE: new auth
This commit is contained in:
@@ -78,7 +78,7 @@ pub fn build_cli() -> Command {
|
||||
.long("auth")
|
||||
.help("Add auth for path")
|
||||
.action(ArgAction::Append)
|
||||
.value_delimiter(',')
|
||||
.value_delimiter('|')
|
||||
.value_name("rules"),
|
||||
)
|
||||
.arg(
|
||||
@@ -288,7 +288,7 @@ impl Args {
|
||||
"basic" => AuthMethod::Basic,
|
||||
_ => AuthMethod::Digest,
|
||||
};
|
||||
let auth = AccessControl::new(&auth, &uri_prefix)?;
|
||||
let auth = AccessControl::new(&auth)?;
|
||||
let allow_upload = matches.get_flag("allow-all") || matches.get_flag("allow-upload");
|
||||
let allow_delete = matches.get_flag("allow-all") || matches.get_flag("allow-delete");
|
||||
let allow_search = matches.get_flag("allow-all") || matches.get_flag("allow-search");
|
||||
|
||||
Reference in New Issue
Block a user