X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Faccess_user.pm;h=44d3beec1c197f521d12a113b20dde465d2f78a5;hb=dba9a62fa32e07d4461e9c081201f69c0cda7015;hp=0a441c45a68cb6592d7e37b79ee4079221478795;hpb=32072dbf59a054529f5304574c0f56f9567d14d0;p=freeside.git diff --git a/FS/FS/access_user.pm b/FS/FS/access_user.pm index 0a441c45a..44d3beec1 100644 --- a/FS/FS/access_user.pm +++ b/FS/FS/access_user.pm @@ -2,7 +2,7 @@ package FS::access_user; use base qw( FS::m2m_Common FS::option_Common ); use strict; -use vars qw( $DEBUG $me $conf ); +use vars qw( $DEBUG $me ); use FS::UID; use FS::Auth; use FS::Conf; @@ -40,17 +40,37 @@ inherits from FS::Record. The following fields are currently supported: =over 4 -=item usernum - primary key +=item usernum -=item username - +primary key -=item _password - +=item username -=item last - +=item _password -=item first - +=item _password_encoding -=item disabled - empty or 'Y' +Empty or bcrypt + +=item last + +Last name + +=item first + +First name + +=item user_custnum + +Master customer for this employee (for commissions) + +=item report_salesnum + +Default sales person for this employee (for reports) + +=item disabled + +Empty or 'Y' =back @@ -404,7 +424,7 @@ sub access_right { unless ( grep !exists($self->{_ACLcache}{$_}), @$rightname ) { warn "$me ACL cache hit for ". join(', ', @$rightname). "\n" if $DEBUG; - return grep $self->{_ACLcache}{$_}, @$rightname + return scalar( grep $self->{_ACLcache}{$_}, @$rightname ); } warn "$me ACL cache miss for ". join(', ', @$rightname). "\n" @@ -456,7 +476,7 @@ sub default_customer_view { my $self = shift; $self->option('default_customer_view') - || $conf->config('cust_main-default_view') + || FS::Conf->new->config('cust_main-default_view') || 'basics'; #s/jumbo/basics/ starting with 3.0 } @@ -491,7 +511,7 @@ sub spreadsheet_format { my $f = $override || $self->option('spreadsheet_format') - || $conf->config('spreadsheet_format') + || FS::Conf->new->config('spreadsheet_format') || 'XLS'; $formats{$f}; @@ -513,6 +533,7 @@ sub is_system_user { fs_signup fs_bootstrap fs_selfserv + fs_api ) ); }