Merge pull request #570 from swissiety/rfc-4331-quota-properties

feat(webdav): RFC 4331 quota-available-bytes/quota-used-bytes
This commit is contained in:
Dionisio Pozo
2026-07-14 12:58:22 +02:00
committed by GitHub
11 changed files with 622 additions and 37 deletions
+6 -6
View File
@@ -131,12 +131,6 @@ impl Drive {
self.default_for_user == Some(user_id)
}
/// `true` if this drive is a personal drive of any kind (default or
/// secondary). Encapsulates the kind check at the call site.
pub fn is_personal(&self) -> bool {
matches!(self.kind, DriveKind::Personal)
}
/// Typed view of `policies` for enforcement code. Lenient deserialise:
/// unknown keys are preserved on disk (the column stays the canonical
/// JSONB bag) but ignored here, missing keys default to `false`.
@@ -144,6 +138,12 @@ impl Drive {
pub fn typed_policies(&self) -> DrivePolicies {
DrivePolicies::from_value(&self.policies)
}
/// `true` if this drive is a personal drive of any kind (default or
/// secondary). Encapsulates the kind check at the call site.
pub fn is_personal(&self) -> bool {
matches!(self.kind, DriveKind::Personal)
}
}
/// Typed mirror of the `policies` JSONB. Five known keys; the JSONB column