From 7a1434e52b4c726ccb691026e2bf8240fae5b6f7 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Wed, 26 Apr 2017 18:00:07 -0700 Subject: [PATCH] fix customer searching with "List customers" right but not "List all customers", RT#75012 --- httemplate/search/cust_main.cgi | 5 +++-- 1 file 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'}), -- 2.11.0