function payment_permission in Payment 7
Implements hook_permission().
See also
File
- ./
payment.module, line 323 - Hook implementations and shared functions.
Code
function payment_permission() {
$permissions = array(
'payment.global.administer' => array(
'title' => t('Administer global Payment configuration'),
),
'payment.rules.administer' => array(
'title' => t('Administer rule configurations'),
'restrict access' => TRUE,
),
'payment.payment.administer' => array(
'title' => t('Administer payment configuration'),
),
'payment.payment.view.any' => array(
'title' => t('View any payment'),
),
'payment.payment.view.own' => array(
'title' => t('View own payments'),
),
'payment.payment.update.any' => array(
'title' => t('Update any payment'),
),
'payment.payment.update.own' => array(
'title' => t('Update own payments'),
),
'payment.payment.delete.any' => array(
'title' => t('Delete any payment'),
),
'payment.payment.delete.own' => array(
'title' => t('Delete own payments'),
),
'payment.payment_method.update.any' => array(
'title' => t('Update any payment method'),
'restrict access' => TRUE,
),
'payment.payment_method.update.own' => array(
'title' => t('Update own payment methods'),
),
'payment.payment_method.delete.any' => array(
'title' => t('Delete any payment method'),
),
'payment.payment_method.delete.own' => array(
'title' => t('Delete own payment methods'),
),
'payment.payment_method.view.any' => array(
'title' => t('View any payment method'),
'restrict access' => TRUE,
),
'payment.payment_method.view.own' => array(
'title' => t('View own payment methods'),
),
'payment.payment_status.view' => array(
'title' => t('View payment status overview'),
),
);
$controllers = payment_method_controller_load_multiple();
unset($controllers['PaymentMethodControllerUnavailable']);
foreach ($controllers as $controller) {
$permissions['payment.payment_method.create.' . $controller->name] = array(
'title' => t('Create %controller_title payment methods', array(
'%controller_title' => $controller->title,
)),
);
}
return $permissions;
}