protected function allowOrDeny($roleName, $resourceName, $access, $action)
{
if (!$this->isRole($roleName)) {
throw new Exception("Role '{$roleName}' does not exist in the list");
}
if (!is_array($access)) {
$access = [$access];
}
foreach ($access as $accessName) {
$this->insertOrUpdateAccess($roleName, $resourceName, $accessName, $action);
}
}