mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-09 00:59:02 +03:00
fix: no authentication check if no auth users
This commit is contained in:
@@ -102,6 +102,9 @@ impl AccessControl {
|
||||
authorization: Option<&HeaderValue>,
|
||||
guard_options: bool,
|
||||
) -> (Option<String>, Option<AccessPaths>) {
|
||||
if self.users.is_empty() {
|
||||
return (None, Some(AccessPaths::new(AccessPerm::ReadWrite)));
|
||||
}
|
||||
if let Some(authorization) = authorization {
|
||||
if let Some(user) = get_auth_user(authorization) {
|
||||
if let Some((pass, paths)) = self.users.get(&user) {
|
||||
|
||||
Reference in New Issue
Block a user