[freeside-commits] freeside/FS/FS/ClientAPI MyAccount.pm, 1.53.2.14, 1.53.2.15

Ivan,,, ivan at wavetail.420.am
Tue Sep 9 15:35:21 PDT 2008


Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory wavetail.420.am:/tmp/cvs-serv6142

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	MyAccount.pm 
Log Message:
allow implied primary services to log into selfservice when selfservice_server-primary_only is on

Index: MyAccount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/MyAccount.pm,v
retrieving revision 1.53.2.14
retrieving revision 1.53.2.15
diff -u -d -r1.53.2.14 -r1.53.2.15
--- MyAccount.pm	9 Sep 2008 21:29:51 -0000	1.53.2.14
+++ MyAccount.pm	9 Sep 2008 22:35:19 -0000	1.53.2.15
@@ -66,14 +66,16 @@
   return { error => 'User not found.' } unless $svc_acct;
 
   my $conf = new FS::Conf;
+
   #my $pkg_svc = $svc_acct->cust_svc->pkg_svc;
   #return { error => 'Only primary user may log in.' } 
   #  if $conf->exists('selfservice_server-primary_only')
   #    && ( ! $pkg_svc || $pkg_svc->primary_svc ne 'Y' );
   my $cust_svc = $svc_acct->cust_svc;
+  my $part_pkg = $cust_svc->cust_pkg->part_pkg;
   return { error => 'Only primary user may log in.' } 
     if $conf->exists('selfservice_server-primary_only')
-      && $cust_svc->svcpart != $cust_svc->cust_pkg->svcpart('svc_acct');
+      && $cust_svc->svcpart != $part_pkg->svcpart('svc_acct');
 
   return { error => 'Incorrect password.' }
     unless $svc_acct->check_password($p->{'password'});



More information about the freeside-commits mailing list