Commit bb5849b0 authored by Liam Morland's avatar Liam Morland
Browse files

ISTWCMS-3908: Replace path.validator with Url::access()

parent 4a2f91e7
......@@ -62,7 +62,7 @@ function uw_dashboard_toolbar_alter(&$items) {
// Adding config form for user with permission to update it. This prevents
// menu item to be displayed and getting access denied by clicking on it.
$url = Url::fromRoute('uw_dashboard.allowed_blocks');
if (\Drupal::service('path.validator')->isValid($url->getInternalPath())) {
if ($url->access()) {
$items['dashboards']['tray']['dashboards']['#items'][] = [
'#type' => 'link',
'#title' => 'Allowed blocks',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment