mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-09-01 08:17:00 +02:00
Fixed some exception about non existing part_attachments permission
This commit is contained in:
parent
3e85fc4d42
commit
676235a2d3
3 changed files with 6 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue