Menu Access permissions are missing
designerbrent - September 16, 2008 - 20:40
| Project: | HTMLBox |
| Version: | 6.x-1.0-beta5 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
Description
Two of the menu access permissions are missing from the 3 menu items. That causes the 'options' page to give an access denied error. Attached is a simple patch to fix that.
| Attachment | Size |
|---|---|
| htmlboxaccess.diff | 697 bytes |

#1
Thank you for pointing this out, and making a patch. I'm still a bit new to D6. I'll add the fix to the next release.
#2
I applied this patch and would like to confirm that I can now access ?q=admin/settings/htmlbox/options.
Please note: you must clear cached data for changes to take effect!
I think you should also be able to access this page if you are logged in as user/1 (in addition to having the permission 'administer site configuration').
Just to confirm: even after applying this patch I have only ONE option listed on the Permissions page for htmlbox, "access htmlbox." I'm not sure what the reference is to three different permissions? Hopefully this means there is a separate permission for "administer htmlbox" as opposed to needing the permission for "administer site configuration." I would not have realized I had to have this flag if it wasn't for the text of this patch!
#3
@emmajane: yes, it is correct that there is only 1 permission to set that is custom to htmlbox.
The reason for the patch is that those menu items were giving an 'access denied' when anyone short of user 1 visited those pages. More could be added but that would be a separate issue.
#4
I was getting "access denied" even as user/1 without the patch....
#5
You know, I may have had the same thing. However, I don't think I was testing it on a site that I have user/1 access. I think that after Drupal 6.3 (not sure the exact version number) the access "access arguments" is required for every menu item. Thus the error.
#6
I don't think it's true that everything needs explicit permissions for user/1... I have a D6.4 sandbox on my laptop. I "never" assign explicit permissions for authenticated users but am still able to add content, and administer the site. It'd be a bit silly if user/1 couldn't administer the site without setting the 'administer site configuration' permission ... how would you even get to the page to change the setting? :)
#7
I don't think you have to assign that permission to user/1. It is assigned automatically. However, you do need to have the 'access argument' in the hook_menu function and that is what changed with 6.2 (I couldn't remember what version it was last time.) Here is the info I have found on that change: http://drupal.org/node/244569