resolve minor ACL glitch linking to payments
authorivan <ivan>
Thu, 27 Mar 2008 20:19:52 +0000 (20:19 +0000)
committerivan <ivan>
Thu, 27 Mar 2008 20:19:52 +0000 (20:19 +0000)
httemplate/search/cust_pay.cgi
httemplate/view/cust_pay.html

index e5465ae..80a611d 100755 (executable)
@@ -235,7 +235,10 @@ if ( $cgi->param('magic') ) {
 
 }
 
-my $link = [ "${p}view/cust_pay.html?paynum=", 'paynum' ];
+my $link = '';
+$link = [ "${p}view/cust_pay.html?paynum=", 'paynum' ]
+  if $FS::CurrentUser::CurrentUser->access_right('View invoices'); #XXX for now
+  #later# if $FS::CurrentUser::CurrentUser->access_right('View customer payments');
 
 my $cust_link = sub {
   my $cust_pay = shift;
index 4037d35..2e2344d 100644 (file)
 my $curuser = $FS::CurrentUser::CurrentUser;
 
 die "access denied"
-  unless $curuser->access_right('View customer payments');
+  unless $curuser->access_right('View invoices') #remove this in 1.9 EVENTUALLY
+  || $curuser->access_right('View customer payments');
 
 $cgi->param('paynum') =~ /^(\d+)$/ or die "no paynum";
 my $paynum = $1;