1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 07:02:34 +01:00
invoiceninja/app/Policies/CreditPolicy.php
2024-01-14 15:05:00 +11:00

17 lines
347 B
PHP

<?php
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class CreditPolicy extends EntityPolicy
{
use HandlesAuthorization;
public function create(User $user): bool
{
return $user->isAdmin() || $user->hasPermission('create_credit') || $user->hasPermission('create_all');
}
}