fix update of userdata after OAuth login (#317, #160)

This commit is contained in:
Christoph Haas 2025-01-13 22:14:00 +01:00
parent 2d78fe33b8
commit 17844ed929

View File

@ -319,7 +319,7 @@ func (m Manager) validateModifications(ctx context.Context, old, new *domain.Use
return fmt.Errorf("insufficient permissions")
}
if err := old.EditAllowed(new); err != nil {
if err := old.EditAllowed(new); err != nil && currentUser.Id != domain.SystemAdminContextUserInfo().Id {
return errors.Join(fmt.Errorf("no access: %w", err), domain.ErrInvalidData)
}