projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb191b6
)
RT# 74537 - added check for config option selfservice-ACH_info_readonly to deletepayb...
author
Christopher Burger
<burgerc@freeside.biz>
Thu, 27 Jul 2017 16:30:25 +0000
(12:30 -0400)
committer
Christopher Burger
<burgerc@freeside.biz>
Thu, 27 Jul 2017 16:30:25 +0000
(12:30 -0400)
FS/FS/ClientAPI/MyAccount.pm
patch
|
blob
|
history
diff --git
a/FS/FS/ClientAPI/MyAccount.pm
b/FS/FS/ClientAPI/MyAccount.pm
index
2b4d52d
..
5c86b78
100644
(file)
--- 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 {