This commit was manufactured by cvs2svn to create tag 'freeside_2_1_1'.
[freeside.git] / httemplate / edit / process / cust_pay.cgi
index d6bbf06..c8b0aa7 100755 (executable)
@@ -27,6 +27,9 @@
 %}
 <%init>
 
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right('Post payment');
+
 $cgi->param('linknum') =~ /^(\d+)$/
   or die "Illegal linknum: ". $cgi->param('linknum');
 my $linknum = $1;
@@ -49,13 +52,6 @@ my $new = new FS::cust_pay ( {
   #} fields('cust_pay')
 } );
 
-my @rights = ('Post payment');
-push @rights, 'Post check payment' if $new->payby eq 'BILL';
-push @rights, 'Post cash payment'  if $new->payby eq 'CASH';
-
-die "access denied"
-  unless $FS::CurrentUser::CurrentUser->access_right(\@rights);
-
 my $error = $new->insert( 'manual' => 1 );
 
 </%init>