Skip to content
Snippets Groups Projects
Commit ddf26c2f authored by Kevin Paxman's avatar Kevin Paxman
Browse files

ISTWCMS-4874: add back removing manage toolbar for non-admins

parent d93a0c00
No related branches found
No related tags found
2 merge requests!111Tag 1.0.1,!108Feature/istwcms 4874 l26yan make people and reports show on dashboard toolbar
......@@ -235,6 +235,12 @@ function uw_cfg_common_toolbar_alter(&$items) {
// Get the current user.
$current_user = \Drupal::currentUser();
// Remove the "manage" people for non-admin users.
if (!$current_user->hasPermission('access manage toolbar item')) {
// Remove "Manage" toolbar item.
unset($items['administration']);
}
// Adjust toolbar for non-admin users.
// Add links to "Workbench". 'dashboards' is renamed in
// uw_dashboard_toolbar_alter().
......
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