diff --git a/commerce_addressbook.module b/commerce_addressbook.module index a70242a..199611a 100644 --- a/commerce_addressbook.module +++ b/commerce_addressbook.module @@ -163,15 +163,15 @@ function commerce_addressbook_profile_page_access($account, $profile_type) { || user_access('view any commerce_customer_profile entity') || user_access('view any commerce_customer_profile entity of bundle ' . $profile_type) || user_access('edit any commerce_customer_profile entity') - || user_access('edit any commerce_customer_profile entity of bundle ' . $profile_type) - || user_access('create commerce_customer_profile entities') - || user_access('create commerce_customer_profile entities of bundle ' . $profile_type)) { + || user_access('edit any commerce_customer_profile entity of bundle ' . $profile_type)) { return TRUE; } // Check if the user can access his own page. if ($user->uid == $account->uid) { if (user_access('view own commerce_customer_profile entities') + || user_access('create commerce_customer_profile entities') + || user_access('create commerce_customer_profile entities of bundle ' . $profile_type) || user_access('view own commerce_customer_profile entities of bundle ' . $profile_type) || user_access('edit own commerce_customer_profile entities') || user_access('edit own commerce_customer_profile entities of bundle ' . $profile_type)) {