[freeside-commits] branch master updated. 7d259262bb97c5a911754e485a61a6ff7bed0104

Ivan ivan at 420.am
Tue Nov 19 21:56:44 PST 2013


The branch, master has been updated
       via  7d259262bb97c5a911754e485a61a6ff7bed0104 (commit)
      from  bc54a75d31ea0e70e5854e4ddb9122d8feecdd74 (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 7d259262bb97c5a911754e485a61a6ff7bed0104
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Nov 19 21:56:43 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