Improved access control for part lists.

This commit is contained in:
Jan Böhmer 2022-10-31 23:10:21 +01:00
parent d0f7949bc9
commit 3e85fc4d42
5 changed files with 68 additions and 36 deletions

View file

@ -80,7 +80,12 @@ class PermissionVoter extends ExtendedVoter
$attribute = ltrim($attribute, '@');
[$perm, $op] = explode('.', $attribute);
return $this->resolver->isValidOperation($perm, $op);
$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.'"!');
return true;
}
return false;