summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-04-06 15:01:27 +0000
committerDries Buytaert <dries@buytaert.net>2010-04-06 15:01:27 +0000
commit393c8e69ed37ce3a520b7f1538cf26b2336c6278 (patch)
tree52bee874c82d45e1abec40c2471e322318c20b3f /modules
parentefb349be4332ff4849f154f48edad1502960eeb5 (diff)
downloadbrdo-393c8e69ed37ce3a520b7f1538cf26b2336c6278.tar.gz
brdo-393c8e69ed37ce3a520b7f1538cf26b2336c6278.tar.bz2
- Patch #652122 by catch, Berdir, mr.baileys, sun, David_Rothstein: access dashboard permission is useless.
Diffstat (limited to 'modules')
-rw-r--r--modules/block/block.test1
-rw-r--r--modules/dashboard/dashboard.module17
-rw-r--r--modules/simpletest/tests/common.test6
3 files changed, 8 insertions, 16 deletions
diff --git a/modules/block/block.test b/modules/block/block.test
index 79b6b19ef..91887fdd5 100644
--- a/modules/block/block.test
+++ b/modules/block/block.test
@@ -27,7 +27,6 @@ class BlockTestCase extends DrupalWebTestCase {
'administer blocks',
filter_permission_name($full_html_format),
'access administration pages',
- 'access dashboard',
));
$this->drupalLogin($admin_user);
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;
}
@@ -155,18 +154,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().
*
* Add regions to each theme to store the dashboard blocks.
diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test
index 68b99f7a1..c1d294e7d 100644
--- a/modules/simpletest/tests/common.test
+++ b/modules/simpletest/tests/common.test
@@ -23,6 +23,12 @@ class DrupalAlterTestCase extends DrupalWebTestCase {
}
function testDrupalAlter() {
+ // This test depends on Garland, so make sure that it is always the current
+ // active theme.
+ global $theme, $base_theme_info;
+ $theme = 'garland';
+ $base_theme_info = array();
+
$array = array('foo' => 'bar');
$entity = new stdClass;
$entity->foo = 'bar';