[freeside-commits] branch FREESIDE_3_BRANCH updated. c9c9577203f43da9b851132c9c120bdf3de1fa47
Ivan
ivan at 420.am
Tue Nov 19 21:56:45 PST 2013
The branch, FREESIDE_3_BRANCH has been updated
via c9c9577203f43da9b851132c9c120bdf3de1fa47 (commit)
from d0166fb1f52865916575ac6aa0eb043d792fe18b (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 c9c9577203f43da9b851132c9c120bdf3de1fa47
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue Nov 19 21:56:44 2013 -0800
prohibit self-service changing of suspended services passwords, RT#26140
diff --git a/FS/FS/ClientAPI/passwd.pm b/FS/FS/ClientAPI/passwd.pm
index b22d761..8001e4f 100644
--- a/FS/FS/ClientAPI/passwd.pm
+++ b/FS/FS/ClientAPI/passwd.pm
@@ -23,6 +23,11 @@ sub passwd {
'domsvc' => $svc_domain->svcnum, }
);
return { error => 'User not found.' } unless $svc_acct;
+
+ my $cust_pkg = $svc_acct->cust_svc->cust_pkg;
+ return { error => "Can't change password for a suspended service" }
+ if $cust_pkg && $cust_pkg->status eq 'suspended';
+
return { error => 'Incorrect password.' }
unless $svc_acct->check_password($old_password);
-----------------------------------------------------------------------
Summary of changes:
FS/FS/ClientAPI/passwd.pm | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
More information about the freeside-commits
mailing list