Hi,
I develop a website with a moderating role who can not manage modules. I was surprise to see the option "Enable/Disable developer modules" in the menu.
After some research, I saw that access to this option was set on "administer site configuration". I suppose it would be better to use the user access "administer modules".
The problem is in the file "admin_menu.info" at the line 503 :
// Add link to toggle developer modules (performance).
$saved_state = variable_get('admin_menu_devel_modules_enabled', NULL);
$links['icon']['toggle-modules'] = array(
'#title' => isset($saved_state) ? t('Enable developer modules') : t('Disable developer modules'),
'#weight' => 88,
'#access' => user_access('administer site configuration'),
'#href' => 'admin_menu/toggle-modules',
'#options' => array(
'query' => $destination + array('token' => drupal_get_token('admin_menu/toggle-modules')),
),
);
Juste replace :
'#access' => user_access('administer site configuration'),
by :
'#access' => user_access('administer modules'),
and it works.
Is that correct?
Comments
Comment #1
sunWell spotted! :)
Yeah, prior to D7, there was no dedicated user permission for administering modules.
Thanks for reporting, reviewing, and testing! Committed to all branches.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.