mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-09 00:59:02 +03:00
@@ -72,6 +72,10 @@ impl AccessControl {
|
||||
Ok(Self { rules })
|
||||
}
|
||||
|
||||
pub fn valid(&self) -> bool {
|
||||
!self.rules.is_empty()
|
||||
}
|
||||
|
||||
pub fn guard(
|
||||
&self,
|
||||
path: &str,
|
||||
@@ -134,6 +138,9 @@ impl GuardType {
|
||||
pub fn is_reject(&self) -> bool {
|
||||
*self == GuardType::Reject
|
||||
}
|
||||
pub fn is_readwrite(&self) -> bool {
|
||||
*self == GuardType::ReadWrite
|
||||
}
|
||||
}
|
||||
|
||||
fn sanitize_path(path: &str, uri_prefix: &str) -> String {
|
||||
|
||||
Reference in New Issue
Block a user