access control for List all customers, RT#75012
authorIvan Kohler <ivan@freeside.biz>
Thu, 27 Apr 2017 20:07:21 +0000 (13:07 -0700)
committerIvan Kohler <ivan@freeside.biz>
Thu, 27 Apr 2017 20:07:21 +0000 (13:07 -0700)
httemplate/search/cust_main.cgi

index 74cc5f3..cce4f0d 100755 (executable)
@@ -352,9 +352,11 @@ my(@cust_main, $sortby, $orderby);
 my @select = ();
 my @addl_headers = ();
 my @addl_cols = ();
-if ( $cgi->param('browse')
-     || $cgi->param('otaker_on')
-     || $cgi->param('agentnum_on')
+if ( (    $cgi->param('browse')
+       || $cgi->param('otaker_on')
+       || $cgi->param('agentnum_on')
+     )
+     and $curuser->access_right('List all customers')
 ) {
 
   my %search = ();