1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/app/Policies/PurchaseOrderPolicy.php

20 lines
366 B
PHP
Raw Normal View History

2022-05-29 05:22:00 +02:00
<?php
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class PurchaseOrderPolicy extends EntityPolicy
{
use HandlesAuthorization;
public function create(User $user) : bool
{
return $user->isAdmin() || $user->hasPermission('create_purchase_order') || $user->hasPermission('create_all');
}
}