Commit 28ceca02 authored by Igor Biki's avatar Igor Biki
Browse files

Merge branch 'feature/ISTWCMS-3908-lkmorlan-url-access' into '8.x-1.x'

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

See merge request !6
parents 4a2f91e7 bb5849b0
......@@ -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