summaryrefslogtreecommitdiff
path: root/modules/dashboard/dashboard.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/dashboard/dashboard.module')
-rw-r--r--modules/dashboard/dashboard.module24
1 files changed, 14 insertions, 10 deletions
diff --git a/modules/dashboard/dashboard.module b/modules/dashboard/dashboard.module
index 0ac52f2b6..02f417707 100644
--- a/modules/dashboard/dashboard.module
+++ b/modules/dashboard/dashboard.module
@@ -29,17 +29,18 @@ function dashboard_menu() {
'title' => 'Dashboard',
'description' => 'View and customize your dashboard',
'page callback' => 'dashboard_admin',
- 'access arguments' => array('access administration pages'),
+ 'access arguments' => array('access dashboard'),
+ 'type' => MENU_LOCAL_TASK | MENU_NORMAL_ITEM,
// 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,
+ 'weight' => -15,
);
$items['admin/dashboard/customize'] = array(
'title' => 'Dashboard',
'description' => 'View and customize your dashboard',
'page callback' => 'dashboard_admin',
'page arguments' => array(TRUE),
- 'access arguments' => array('access administration pages'),
+ 'access arguments' => array('access dashboard'),
'type' => MENU_CALLBACK,
);
$items['admin/dashboard/drawer'] = array(
@@ -62,14 +63,17 @@ function dashboard_menu() {
}
/**
- * Implements hook_menu_alter().
+ * Implements hook_permission().
*/
-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/dashboard']['type'] = MENU_DEFAULT_LOCAL_TASK;
- $items['admin/by-task']['type'] = MENU_LOCAL_TASK;
+function dashboard_permission() {
+ return array(
+ 'access dashboard' => array(
+ 'title' => t('View the administrative dashboard'),
+ 'description' => t('Customizing the dashboard requires the !permission-name permission.', array(
+ '!permission-name' => l(t('Administer blocks'), 'admin/people/permissions', array('fragment' => 'module-block')),
+ )),
+ ),
+ );
}
/**