1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 14:12:44 +01:00
invoiceninja/app/Policies/PurchaseOrderPolicy.php
2022-05-29 05:22:00 +02:00

20 lines
366 B
PHP

<?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');
}
}