[freeside-commits] branch FREESIDE_3_BRANCH updated. 7a1434e52b4c726ccb691026e2bf8240fae5b6f7

Ivan ivan at 420.am
Wed Apr 26 18:00:08 PDT 2017


The branch, FREESIDE_3_BRANCH has been updated
       via  7a1434e52b4c726ccb691026e2bf8240fae5b6f7 (commit)
      from  6bb484c1877f2436de835981527bd5c2fd02df1d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7a1434e52b4c726ccb691026e2bf8240fae5b6f7
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Apr 26 18:00:07 2017 -0700

    fix customer searching with "List customers" right but not "List all customers", RT#75012

diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi
index b2c977a..a5293f4 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'}),

-----------------------------------------------------------------------

Summary of changes:
 httemplate/search/cust_main.cgi |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list