]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Controller/CustomerVendor.pm
Task-Server: Mandantenfähigkeit
[mfinanz.git] / SL / Controller / CustomerVendor.pm
index f77c65e202ed6990caa9ba7037ba858b0a8e4d26..625ec62e07253f96d19e28c437c4249b39c79972 100644 (file)
@@ -826,6 +826,16 @@ sub _load_customer_vendor {
   }
 }
 
+sub _check_customer_vendor_all_edit {
+  my ($self) = @_;
+
+  unless ($::auth->assert('customer_vendor_all_edit', 1)) {
+    die($::locale->text("You don't have the rights to edit this customer.") . "\n")
+      if $self->{cv}->is_customer and
+         SL::DB::Manager::Employee->current->id != $self->{cv}->salesman_id;
+  };
+};
+
 sub _create_customer_vendor {
   my ($self) = @_;