The permissions class: UcAddressesPermissions
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
This class checks for view, edit and delete access for a single address. So whenever you want to check permissions for address access, you should not call user_access(), but call the appropriate method in this class. Call canViewAddress() for view access, canEditAddress() for edit access and canDeleteAddress() for delete access. The class will then take care for calling user_access() itself.
If the permissions defined by Ubercart Addresses do not fit your needs, you are able to get further control about address access by implementing hook_uc_addresses_may_view(), hook_uc_addresses_may_edit() or hook_uc_addresses_may_delete(). See uc_addresses.api.php - included with the module - for more information.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion