X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/9c0d1e30a155039c87395f83429a269344449846..b638b6a13dea5935637b3c38b1a3252053fa1a46:/SL/Controller/DeliveryPlan.pm 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";