summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhalid Baheyeldin2009-12-25 17:46:02 +0000
committerKhalid Baheyeldin2009-12-25 17:46:02 +0000
commit1b035f4ee229da58ebb049b25cfa07eacb695c61 (patch)
treecf407c003d95b4e4b4e93c0a25fa615c15a7e380
parentbaee206fa4f7896a33cbe1cda00e5f3cd5bcfb9c (diff)
#608126 by dalin, fgm: give performance module real permissions
-rw-r--r--performance/performance.module19
1 files changed, 15 insertions, 4 deletions
diff --git a/performance/performance.module b/performance/performance.module
index 3b2e687..4d18f35 100644
--- a/performance/performance.module
+++ b/performance/performance.module
@@ -17,7 +17,7 @@ function performance_menu() {
'description' => 'Logs performance data: page generation times and memory usage.',
'page callback' => 'drupal_get_form',
'page arguments' => array('performance_settings'),
- 'access arguments' => array('access administration pages'),
+ 'access arguments' => array('administer performance logging'),
);
$items['admin/config/development/performance_logging/apc_clear'] = array(
@@ -25,26 +25,37 @@ function performance_menu() {
'description' => 'Clears performance statistics collected in APC.',
'page callback' => 'drupal_get_form',
'page arguments' => array('performance_clear_apc_confirm'),
- 'access arguments' => array('access administration pages'),
+ 'access arguments' => array('administer performance logging'),
);
$items['admin/reports/performance_logging_summary'] = array(
'title' => 'Performance Logs: Summary',
'description' => 'View summary performance logs: page generation times and memory usage.',
'page callback' => 'performance_view_summary',
- 'access arguments' => array('access site reports'),
+ 'access arguments' => array('administer performance logging'),
);
$items['admin/reports/performance_logging_details'] = array(
'title' => 'Performance Logs: Details',
'description' => 'View detailed, per page, performance logs: page generation times and memory usage.',
'page callback' => 'performance_view_details',
- 'access arguments' => array('access site reports'),
+ 'access arguments' => array('administer performance logging'),
);
return $items;
}
+/**
+ * Implementation of hook_permission().
+ */
+function performance_permission() {
+ return array(
+ 'administer performance logging' => array(
+ 'title' => t('Administer performance logging'),
+ 'description' => t('Allows both configuring the performance module and accessing its reports.'),
+ ));
+}
+
function performance_settings() {
$options = array(
0 => t('Disabled'),