Drupal – Disable Admin tools menu for other users

I always use Admin Tools in all my Drupal 6 websitea. but by default the Admin tools menu will be shown to all users with Admin Tools access. If you want to limit the it to super admin, apply the following patch.
admin_tools-n934536-d6.patch

Source:

Index: admin_tools.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/admin_tools/admin_tools.module,v
retrieving revision 1.1
diff -u -p -r1.1 admin_tools.module
--- admin_tools.module	10 Aug 2010 17:08:23 -0000	1.1
+++ admin_tools.module	7 Oct 2010 12:09:45 -0000
@@ -88,8 +88,12 @@ function admin_tools_block($op = 'list',
   else if ($op == 'view') {
     switch($delta) {
       case 'clearcache':
-        $block = array('subject' => t('Admin Tools'),
-          'content' => admin_tools_admin_content());
+        if (user_access('administer site configuration')) {
+          $block = array(
+            'subject' => t('Admin Tools'),
+            'content' => admin_tools_admin_content(),
+          );
+        }
         break;
     }
     return $block;

 

Done =)

Reference: Admin Tools block shouldn’t show if user doesn’t have ‘administer site configuration’ perm

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.