Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WCMS
uw_dashboard
Commits
bb5849b0
Commit
bb5849b0
authored
Mar 09, 2021
by
Liam Morland
Browse files
ISTWCMS-3908: Replace path.validator with Url::access()
parent
4a2f91e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
uw_dashboard.module
View file @
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'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment