Anbebots-/Auftragsbericht: Recht "Ansehen von Belegen" berücksichtigen
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Tue, 8 Mar 2022 16:12:42 +0000 (17:12 +0100)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Tue, 8 Mar 2022 16:44:27 +0000 (17:44 +0100)
SL/OE.pm

index 332d634..b273d81 100644 (file)
--- a/SL/OE.pm
+++ b/SL/OE.pm
@@ -192,7 +192,8 @@ SQL
     push(@values, (like($form->{"cp_name"}))x2);
   }
 
-  if ( !(($vc eq 'customer' && $main::auth->assert('sales_all_edit', 1)) || ($vc eq 'vendor' && $main::auth->assert('purchase_all_edit', 1))) ) {
+  if ( !(    ($vc eq 'customer' && ($main::auth->assert('sales_all_edit',    1) || $main::auth->assert('sales_order_view',    1)))
+          || ($vc eq 'vendor'   && ($main::auth->assert('purchase_all_edit', 1) || $main::auth->assert('purchase_order_view', 1))) ) ) {
     $query .= " AND o.employee_id = (select id from employee where login= ?)";
     push @values, $::myconfig{login};
   }