protected function hasPolicyEntryForMethod($className, $methodName)
{
$methodPrivileges = $this->policyService->getAllPrivilegesByType(MethodPrivilegeInterface::class);
/** @var MethodPrivilegeInterface $privilege */
foreach ($methodPrivileges as $privilege) {
if ($privilege->matchesMethod($className, $methodName)) {
return true;
}
}
return false;
}