Ensure all routes check for authorization

This commit is contained in:
Lennart
2025-01-19 00:20:16 +01:00
parent 130f754cdd
commit 6485b89c73
9 changed files with 59 additions and 13 deletions

View File

@@ -64,6 +64,14 @@ impl UserPrivilegeSet {
}
}
pub fn owner_read(is_owner: bool) -> Self {
if is_owner {
Self::read_only()
} else {
Self::default()
}
}
pub fn read_only() -> Self {
Self {
privileges: HashSet::from([