Closed (fixed)
Project:
Printer, email and PDF versions
Version:
5.x-4.8
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Oct 2009 at 14:16 UTC
Updated:
27 Oct 2009 at 00:20 UTC
For several menu items, print_menu is setting the 'access' parameter to an array of permissions (6.x-style), instead of calling user_access, which is not right, and means even users with sufficient permissions can't access.
The cleanest fix is to just delete the 'access' parameter on these items, so that Drupal uses the access settings of the parent menu item, which should be the same. Here's a patch:
Index: print.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/print/print.module,v
retrieving revision 1.15.2.5.2.29.2.62.2.30
diff -u -r1.15.2.5.2.29.2.62.2.30 print.module
--- print.module 20 Aug 2009 02:19:06 -0000 1.15.2.5.2.29.2.62.2.30
+++ print.module 12 Oct 2009 14:14:06 -0000
@@ -127,7 +127,6 @@
'title' => t('Text strings'),
'callback' => 'drupal_get_form',
'callback arguments' => array('print_html_strings_settings'),
- 'access' => array('administer print'),
'weight' => 2,
'type' => MENU_LOCAL_TASK,
);
@@ -136,7 +135,6 @@
'title' => t('Settings'),
'callback' => 'drupal_get_form',
'callback arguments' => array('print_main_settings'),
- 'access' => user_access('administer print'),
'weight' => 10,
'type' => MENU_LOCAL_TASK,
);
@@ -151,7 +149,6 @@
'title' => t('Text strings'),
'callback' => 'drupal_get_form',
'callback arguments' => array('print_main_strings_settings'),
- 'access' => array('administer print'),
'weight' => 2,
'type' => MENU_LOCAL_TASK,
);
Comments
Comment #1
jcnventuraHi,
The 'administer print' is there for a reason. I have changed the code to use the Drupal 5 syntax and not the Drupal 6 syntax that came from the backport of this functionality.
The fix will be shortly in the 5.x-dev version.
João