mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-14 15:01:14 +00:00
fix disabling of missing ldap users (#344) and allow deletion of all user types
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user