diff options
author | ivan <ivan> | 2008-09-09 22:35:19 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-09-09 22:35:19 +0000 |
commit | 9c34be9ec304d9c3f936bdf4dd6d6c23a847c34f (patch) | |
tree | 3fcd4092a21b976d31189ea1034aeb178f557966 | |
parent | 893b5c41f94631ba9366fef8c387187358471959 (diff) |
allow implied primary services to log into selfservice when selfservice_server-primary_only is on
-rw-r--r-- | FS/FS/ClientAPI/MyAccount.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index 0f851c4f2..e8806e0c4 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -66,14 +66,16 @@ sub login { 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'}); |