[freeside-commits] branch master updated. fed350a1aa758b095ca220a798939733b774dcc5
Christopher Burger
burgerc at 420.am
Thu Jul 27 09:30:26 PDT 2017
The branch, master has been updated
via fed350a1aa758b095ca220a798939733b774dcc5 (commit)
from eb191b6420d2a77218bdbfece57b92fdcfb5fa33 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fed350a1aa758b095ca220a798939733b774dcc5
Author: Christopher Burger <burgerc at freeside.biz>
Date: Thu Jul 27 12:30:25 2017 -0400
RT# 74537 - added check for config option selfservice-ACH_info_readonly to deletepayby method
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index 2b4d52d..5c86b78 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -1748,8 +1748,13 @@ sub delete_payby {
})
or return { 'error' => 'unknown custpaybynum '. $p->{'custpaybynum'} };
- return { 'error' => $cust_payby->delete };
-
+ my $conf = new FS::Conf;
+ if (($cust_payby->payby eq "DCHK" || $cust_payby->payby eq "CHEK") && $conf->exists('selfservice-ACH_info_readonly')) {
+ return { 'error' => "Sorry you do not have permission to delete bank information." };
+ }
+ else {
+ return { 'error' => $cust_payby->delete };
+ }
}
sub cancel {
-----------------------------------------------------------------------
Summary of changes:
FS/FS/ClientAPI/MyAccount.pm | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
More information about the freeside-commits
mailing list