Skip to content
Snippets Groups Projects
Commit ae2c25ec authored by Liam Morland's avatar Liam Morland Committed by Kevin Paxman
Browse files

ISTWCMS-4631: Use permission 'access manage toolbar item' instead of UWService::userIsAdmin()

parent 13279101
No related branches found
No related tags found
1 merge request!70ISTWCMS-4631: Toolbar permissions instead of role checks
...@@ -195,7 +195,7 @@ function uw_cfg_common_toolbar_alter(&$items) { ...@@ -195,7 +195,7 @@ function uw_cfg_common_toolbar_alter(&$items) {
unset($items['administration']); unset($items['administration']);
} }
// Adjust toolbar for non-admin users. // Adjust toolbar for non-admin users.
elseif (!UWService::userIsAdmin($current_user)) { if (!$current_user->hasPermission('access manage toolbar item')) {
// Remove "Manage" toolbar item. // Remove "Manage" toolbar item.
unset($items['administration']); unset($items['administration']);
// Add links to "Workbench". 'dashboards' is renamed in // Add links to "Workbench". 'dashboards' is renamed in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment