Download & Extend

Give performance logging module real permissions

Project:Devel
Version:7.x-1.x-dev
Component:performance
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Currently the performance module displays its menu items to anyone with the 'access administration pages' perm. This means that on a big site content creators/editors will likely have access to the module settings. This patch creates a real permission called 'administer performance logging'.

AttachmentSizeStatusTest resultOperations
performance_logging_perms.diff2.59 KBIdleFAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to checkout from [:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal/drupal].View details

Comments

#1

Status:needs review» needs work

I like it. Can you create a patch for D7 as well?

#2

Version:6.x-1.x-dev» 7.x-1.x-dev
Status:needs work» needs review

Here's a patch for D7. Almost byte-for-byte equivalent to the D6 version.

AttachmentSizeStatusTest resultOperations
performance_logging_perm_d7.diff2.28 KBIdleFAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to checkout from [:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal/drupal].View details

#3

Status:needs review» needs work

The permissions hook changed in D7:
http://api.drupal.org/api/function/hook_permission/7

#4

Status:needs work» needs review

Rerolled so that it now works.

This being done, I'm not too fond of using the same permission for "configure the module" and "access report". Wouldn't it be better to use the system-wide existing permission to "View site reports" from system.module ?

AttachmentSizeStatusTest resultOperations
performance_logging_perm_d7.patch2.47 KBIdleFAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to checkout from [:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal/drupal].View details

#5

Status:needs review» fixed

Committed. Thank you both.

#6

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.