summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2017-04-26 18:00:07 -0700
committerIvan Kohler <ivan@freeside.biz>2017-04-26 18:00:07 -0700
commit7a1434e52b4c726ccb691026e2bf8240fae5b6f7 (patch)
tree58ad1a05cde6b1b4feaf589a6b8d8c27bde3ffde
parent6bb484c1877f2436de835981527bd5c2fd02df1d (diff)
fix customer searching with "List customers" right but not "List all customers", RT#75012
-rwxr-xr-xhttemplate/search/cust_main.cgi5
1 files changed, 3 insertions, 2 deletions
diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi
index b2c977ad2..a5293f455 100755
--- a/httemplate/search/cust_main.cgi
+++ b/httemplate/search/cust_main.cgi
@@ -329,7 +329,8 @@
my $curuser = $FS::CurrentUser::CurrentUser;
die "access denied"
- unless $curuser->access_right('List all customers');
+ unless $curuser->access_right('List all customers')
+ || $curuser->access_right('List customers');
my $conf = new FS::Conf;
my $maxrecords = $conf->config('maxsearchrecordsperpage') || 100;
@@ -586,7 +587,7 @@ sub cardsearch {
my($card)=$cgi->param('card');
$card =~ s/\D//g;
- $card =~ /^(\d{13,16}|\d{8,9})$/ or errorpage(emt("Illegal card number"));
+ $card =~ /^(\d{13,19}|\d{8,9})$/ or errorpage(emt("Illegal card number"));
my($payinfo)=$1;
[ qsearch('cust_main',{'payinfo'=>$payinfo, 'payby'=>'CARD'}),