/**
* @inheritdoc
*/
public function checkAccess($userId, $permissionName, $params = [])
{
$permissionName = preg_replace('#^\\/(.*)#', '$1', $permissionName);
foreach ($this->getPermissions() as $permission) {
if ($permission->type == $permission::TYPE_ROLE) {
continue;
}
if (!preg_match('#^' . $permission->name . '$#', $permissionName)) {
continue;
}
if (parent::checkAccess($userId, $permission->name, $params)) {
return true;
}
}
return parent::checkAccess($userId, $permissionName, $params);
}