Skip to content

Commit

Permalink
Allow admins to access "self-serve" options regardless of settings
Browse files Browse the repository at this point in the history
  • Loading branch information
adixon committed Oct 27, 2020
1 parent b5a3a19 commit 85dbb88
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CRM/Core/Payment/iATSService.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,11 @@ protected function allowSelfService($action) {
if ('CRM_Core_Payment_iATSServiceACHEFT' == CRM_Utils_System::getClassName($this)) {
return FALSE;
}
elseif (FALSE == $this->getSettings('enable_'.$action)) {
elseif (!CRM_Core_Permission::check('access CiviContribution')) {
// disable self-service 'action' if the admin has not allowed it
return FALSE;
if (FALSE == $this->getSettings('enable_'.$action)) {
return FALSE;
}
}
return TRUE;
}
Expand All @@ -146,7 +148,7 @@ public function supportsFutureRecurStartDate() {
* @return bool
*/

public function supportsUpdateSubscriptionBillingInfo() {
public function supportsUpdateSubscriptionBillingInfo() {
return $this->allowSelfService('update_subscription_billing_info');
}

Expand Down

0 comments on commit 85dbb88

Please sign in to comment.