Closed (fixed)
Project:
Commerce Addressbook
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Mar 2012 at 19:28 UTC
Updated:
26 Apr 2012 at 19:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
BassistJimmyJam commentedAttached patch adds missing permission checks.
Comment #2
bojanz commentedCommitted an extended version with some additional cleanup that fixes admin access in other places as well:
http://drupalcode.org/project/commerce_addressbook.git/commitdiff/d85abb2
Thanks!
Comment #3
bojanz commentedRetitling.
Comment #4
plopescHello I found a problem with access callbacks because I have not enbled the commerce addressbook for billing addresses, but enabled for shipping address.
Then on hook_menu, when calling to commerce_customer_profile_types() on line 53, first result is billing, and then, you pass is as argument for access callback in user/%user/addressbook page.
When I try to access to user/%user/addressbook, it checks if I enabled the billing addressbook, and I can't access to the page. However I can access to user/%user/addressbook/shipping. Moreover, the Address Book tab is not displayed in the user profile given that the user can't access to user/%user/addressbook.
I'm attaching a patch that improves that behavior, setting as MENU_DEFAULT_LOCAL_TASK the first enabled addressbook. Now, I can access to my shipping addressbook from the user profile page.
Thanks for this great module.
Regards
Comment #5
bojanz commentedGood catch! Committed and pushed. Thanks.