WebDAV permissions and logging (closes #1362)

This commit is contained in:
mdecimus
2025-05-09 15:47:09 +02:00
parent fe7d646966
commit 095c501a66
50 changed files with 1031 additions and 273 deletions

View File

@@ -406,12 +406,12 @@ impl<T: SessionStream> Session<T> {
.await
}
pub fn assert_has_permission(&self, permission: Permission) -> trc::Result<()> {
pub fn assert_has_permission(&self, permission: Permission) -> trc::Result<bool> {
match &self.state {
State::Authenticated { data } | State::Selected { data, .. } => {
data.access_token.assert_has_permission(permission)
}
State::NotAuthenticated { .. } => Ok(()),
State::NotAuthenticated { .. } => Ok(false),
}
}
}