freeside/FS/FS/ClientAPI MyAccount.pm,1.21,1.22
ivan
ivan at pouncequick.420.am
Mon Jun 21 03:26:18 PDT 2004
Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory pouncequick:/tmp/cvs-serv17248/ClientAPI
Modified Files:
MyAccount.pm
Log Message:
option to only allow primary users access to the self-service server
Index: MyAccount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/MyAccount.pm,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- MyAccount.pm 10 Jun 2004 12:31:31 -0000 1.21
+++ MyAccount.pm 21 Jun 2004 10:26:14 -0000 1.22
@@ -60,6 +60,8 @@
'domsvc' => $svc_domain->svcnum, }
);
return { error => 'User not found.' } unless $svc_acct;
+
+
return { error => 'Incorrect password.' }
unless $svc_acct->check_password($p->{'password'});
@@ -72,6 +74,12 @@
my $cust_main = $cust_pkg->cust_main;
$session->{'custnum'} = $cust_main->custnum;
}
+
+ 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 ne 'Y' );
my $session_id;
do {
More information about the freeside-commits
mailing list