Fixed some inspection issues.

This commit is contained in:
Jan Böhmer 2020-08-21 22:43:37 +02:00
parent 6caf605fe2
commit e01b06fb85
80 changed files with 173 additions and 218 deletions

View file

@ -88,12 +88,14 @@ class NoLockoutValidator extends ConstraintValidator
$user = $this->entityManager->getRepository(User::class)->getAnonymousUser();
}
if ($user instanceof User) {
//Check if we the change_permission permission has changed from allow to disallow
if (false === ($this->resolver->inherit($user, 'users', 'edit_permissions') ?? false)) {
$this->context->addViolation($constraint->message);
}
}
//Check if we the change_permission permission has changed from allow to disallow
if (($user instanceof User) && false === ($this->resolver->inherit(
$user,
'users',
'edit_permissions'
) ?? false)) {
$this->context->addViolation($constraint->message);
}
}
}
}