Browse Source

fixed all the tests

pull/60/head
Joe Koop 3 years ago
parent
commit
1b86a5b709
No known key found for this signature in database
GPG Key ID: B2D0C6242D5AC1FF
  1. 10
      src/auth.rs

10
src/auth.rs

@ -106,8 +106,14 @@ impl AccessControl { @@ -106,8 +106,14 @@ impl AccessControl {
}
if let Some(authorization) = authorization {
if let Some(Account { user, pass }) = &control.readonly {
if valid_digest(authorization, method.as_str(), user, pass).is_some() {
return GuardType::ReadOnly;
if basic_auth {
if valid_basic_auth(authorization, user, pass).is_some() {
return GuardType::ReadOnly;
}
} else {
if valid_digest(authorization, method.as_str(), user, pass).is_some() {
return GuardType::ReadOnly;
}
}
}
}

Loading…
Cancel
Save