js-Validator: Kommentar-Update
[kivitendo-erp.git] / SL / Controller / DeliveryPlan.pm
index aca9918..4a45863 100644 (file)
@@ -15,7 +15,6 @@ use SL::DBUtils ();
 use Carp;
 
 use Rose::Object::MakeMethods::Generic (
-  scalar => [ qw(db_args flat_filter) ],
   'scalar --get_set_init' => [ qw(models all_edit_right vc use_linked_items all_employees all_businesses all_departments) ],
 );
 
@@ -339,7 +338,7 @@ sub init_models {
 }
 
 sub init_all_edit_right {
-  $::auth->assert('sales_all_edit', 1)
+  return $_[0]->vc eq 'customer' ? $::auth->assert('sales_all_edit', 1) : $::auth->assert('purchase_all_edit', 1);
 }
 sub init_vc {
   return $::form->{vc} if ($::form->{vc} eq 'customer' || $::form->{vc} eq 'vendor') || croak "self (DeliveryPlan) has no vc defined";