mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 05:52:19 +00:00
Ensure all routes check for authorization
This commit is contained in:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user