fix disabling of missing ldap users (#344) and allow deletion of all user types

This commit is contained in:
Christoph Haas
2025-01-18 17:39:18 +01:00
parent 31c0daeba8
commit c73ce0288e
4 changed files with 30 additions and 11 deletions

View File

@@ -101,11 +101,7 @@ func (u *User) EditAllowed(new *User) error {
}
func (u *User) DeleteAllowed() error {
if u.Source == UserSourceDatabase {
return nil
}
return errors.New("delete only allowed for database source")
return nil // all users can be deleted, OAuth and LDAP users might still be recreated
}
func (u *User) CheckPassword(password string) error {