change handle endpoint & why was changepassword a GET?

This commit is contained in:
2026-03-01 14:53:54 +01:00
parent b2a80ffa58
commit e60172527c
5 changed files with 48 additions and 5 deletions

View File

@@ -8,10 +8,13 @@ pub enum Permission {
RevokeOthersSessions,
// All Users have the right to change their own password
ChangeOthersPasswords,
// All Users have the right to change their own handle
ChangeOthersHandles,
}
impl User {
pub fn has_permission(&self, permission: Permission) -> Result<bool, DatabaseError> {
// Infradmin and systemuser have all permissions
if self.is_infradmin() || self.is_systemuser() {
return Ok(true);
}