Skip to content

Commit 0b5a3fb

Browse files
committed
Issue #2910847 by Londova, bojanz: Give authenticated users the "manage own commerce_payment_method" permission by default
1 parent 0660fc6 commit 0b5a3fb

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

modules/payment/commerce_payment.install

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66
*/
77

88
use Drupal\Core\Field\BaseFieldDefinition;
9+
use Drupal\Core\Session\AccountInterface;
10+
11+
/**
12+
* Implements hook_install().
13+
*/
14+
function commerce_payment_install() {
15+
// Allow authenticated users to manage own payment methods.
16+
user_role_grant_permissions(AccountInterface::AUTHENTICATED_ROLE, ['manage own commerce_payment_method']);
17+
}
918

1019
/**
1120
* Add the payment_gateway_mode field to payments and payment methods.

0 commit comments

Comments
 (0)