Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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'.
Comment | File | Size | Author |
---|---|---|---|
#4 | performance_logging_perm_d7.patch | 2.47 KB | fgm |
#2 | performance_logging_perm_d7.diff | 2.28 KB | dalin |
performance_logging_perms.diff | 2.59 KB | dalin | |
Comments
Comment #1
kbahey CreditAttribution: kbahey commentedI like it. Can you create a patch for D7 as well?
Comment #2
dalinHere's a patch for D7. Almost byte-for-byte equivalent to the D6 version.
Comment #3
fgmThe permissions hook changed in D7:
http://api.drupal.org/api/function/hook_permission/7
Comment #4
fgmRerolled 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 ?
Comment #5
kbahey CreditAttribution: kbahey commentedCommitted. Thank you both.