Fixed some exception about non existing part_attachments permission

This commit is contained in:
Jan Böhmer 2022-11-02 23:20:30 +01:00
parent 3e85fc4d42
commit 676235a2d3
3 changed files with 6 additions and 4 deletions

View file

@ -83,7 +83,9 @@ class PermissionVoter extends ExtendedVoter
$valid = $this->resolver->isValidOperation($perm, $op);
//if an invalid operation is encountered, throw an exception so the developer knows it
//throw new \RuntimeException('Encountered invalid permission operation "'.$op.'" for permission "'.$perm.'"!');
if(!$valid) {
throw new \RuntimeException('Encountered invalid permission operation "'.$op.'" for permission "'.$perm.'"!');
}
return true;
}