Use the new VoterHelper in voters

This commit is contained in:
Jan Böhmer 2023-08-28 22:00:25 +02:00
parent fc6643bd6f
commit 6be55d1837
16 changed files with 146 additions and 162 deletions

View file

@ -107,4 +107,18 @@ final class VoterHelper
//Otherwise throw an exception
throw new \RuntimeException('The user could not be resolved.');
}
/**
* Checks if the permission operation combination with the given names is existing.
* Just a proxy to the permission manager.
*
* @param string $permission the name of the permission which should be checked
* @param string $operation the name of the operation which should be checked
*
* @return bool true if the given permission operation combination is existing
*/
public function isValidOperation(string $permission, string $operation): bool
{
return $this->permissionManager->isValidOperation($permission, $operation);
}
}