mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Prevent expense or task invoice item from creating a product
This commit is contained in:
parent
986487b4c9
commit
243005b667
@ -539,7 +539,7 @@ class InvoiceRepository extends BaseRepository
|
||||
}
|
||||
|
||||
if ($productKey = trim($item['product_key'])) {
|
||||
if (\Auth::user()->account->update_products && ! strtotime($productKey)) {
|
||||
if (\Auth::user()->account->update_products && ! strtotime($productKey) && ! $task && ! $expense) {
|
||||
$product = Product::findProductByKey($productKey);
|
||||
if (!$product) {
|
||||
if (Auth::user()->can('create', ENTITY_PRODUCT)) {
|
||||
|
Loading…
Reference in New Issue
Block a user