mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-30 05:24:28 +02:00
Fixed some inspection issues.
This commit is contained in:
parent
6caf605fe2
commit
e01b06fb85
80 changed files with 173 additions and 218 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue