X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/8a47996aaf3e91db6b21ee147c2cc269ee1d3e6d..c22e188b4d7aabd:/SL/Controller/DeliveryPlan.pm?ds=sidebyside diff --git a/SL/Controller/DeliveryPlan.pm b/SL/Controller/DeliveryPlan.pm index f8d5d03c4..4a458638a 100644 --- a/SL/Controller/DeliveryPlan.pm +++ b/SL/Controller/DeliveryPlan.pm @@ -338,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";