From 393c8e69ed37ce3a520b7f1538cf26b2336c6278 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 6 Apr 2010 15:01:27 +0000 Subject: - Patch #652122 by catch, Berdir, mr.baileys, sun, David_Rothstein: access dashboard permission is useless. --- modules/dashboard/dashboard.module | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'modules/dashboard/dashboard.module') diff --git a/modules/dashboard/dashboard.module b/modules/dashboard/dashboard.module index af789e064..c90f65d75 100644 --- a/modules/dashboard/dashboard.module +++ b/modules/dashboard/dashboard.module @@ -29,7 +29,7 @@ function dashboard_menu() { 'title' => 'Dashboard', 'description' => 'View and customize your dashboard', 'page callback' => 'dashboard_admin', - 'access arguments' => array('access dashboard'), + 'access arguments' => array('access administration pages'), // Make this appear first, so for example, in admin menus, it shows up on // the top corner of the window as a convinient "home link". 'weight' => -100, @@ -39,7 +39,7 @@ function dashboard_menu() { 'description' => 'View and customize your dashboard', 'page callback' => 'dashboard_admin', 'page arguments' => array(TRUE), - 'access arguments' => array('access dashboard'), + 'access arguments' => array('access administration pages'), 'type' => MENU_CALLBACK, ); $items['admin/dashboard/drawer'] = array( @@ -68,7 +68,6 @@ function dashboard_menu_alter(&$items) { // Make the dashboard the default local task on /admin. $items['admin']['title'] = 'Dashboard'; $items['admin']['page callback'] = 'dashboard_admin'; - $items['admin']['access arguments'] = array('access dashboard'); $items['admin/dashboard']['type'] = MENU_DEFAULT_LOCAL_TASK; $items['admin/by-task']['type'] = MENU_LOCAL_TASK; } @@ -154,18 +153,6 @@ function dashboard_page_build(&$page) { } } -/** - * Implements hook_permission(). - */ -function dashboard_permission() { - return array( - 'access dashboard' => array( - 'title' => t('View the administrative dashboard'), - 'description' => t('Note: modifying the dashboard requires the !administer_blocks permission.', array('!administer_blocks' => l(t('Administer blocks'), 'admin/people/permissions', array('fragment' => 'module-block')))), - ), - ); -} - /** * Implements hook_system_info_alter(). * -- cgit v1.2.3