]> wagnertech.de Git - mfinanz.git/blobdiff - bin/mozilla/ir.pl
Recht: Ansehen von Einkaufsrechnungen berücksichtigen
[mfinanz.git] / bin / mozilla / ir.pl
index cca6d12f1acaad9381f36fd1c63b6e18469f5f3d..1b9a782ad86cb78ef8e32e6438d43287342b5510 100644 (file)
@@ -56,9 +56,10 @@ use strict;
 # end of main
 
 sub _may_view_or_edit_this_invoice {
-  return 1 if  $::auth->assert('ap_transactions', 1); # may edit all invoices
-  return 0 if !$::form->{id};                         # creating new invoices isn't allowed without invoice_edit
-  return 0 if !$::form->{globalproject_id};           # existing records without a project ID are not allowed
+  return 1 if  $::auth->assert('ap_transactions', 1);       # may edit all invoices
+  return 0 if !$::form->{id};                               # creating new invoices isn't allowed without invoice_edit
+  return 1 if  $::auth->assert('purchase_invoice_view', 1); # viewing is allowed with this right
+  return 0 if !$::form->{globalproject_id};                 # existing records without a project ID are not allowed
   return SL::DB::Project->new(id => $::form->{globalproject_id})->load->may_employee_view_project_invoices(SL::DB::Manager::Employee->current);
 }