For the "manage credit cards" page (user/%user/creditcards), there is a custom access callback uc_cim_manage_cards_access().
This access callback provides access to users managing their own credit cards. This part is correct.
It ALSO provides access to users with the 'administer credit cards' permission.
This is incorrect. Instead, it should check for the 'process credit cards' permission, so that users with that level of access can manage users' credit cards through their user account page.
The 'process credit card' permission is correctly used 5 other times throughout the module - this is the only place the permission is not correctly declared.
The only way for store admins to manage a user's credit cards is through the store orders interface, which is not ideal when trying to modify the data for a particular user.
Comments
Comment #1
j.helmer commentedAny progress? This is a high-volume production site, and I don't want to have to do a hook_menu_alter to fix this.
Comment #2
j.helmer commentedOK I have no choice but to write a hook_menu_alter() that will accomplish the fix.
In case anyone wants to turn this into a patch, the current access code is:
And instead should be:
Comment #3
m.stentaThanks j.helmer!
Comitted!