1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-18 09:04:35 +01:00
invoiceninja/app/Policies/CreditPolicy.php

17 lines
348 B
PHP
Raw Normal View History

<?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
{
2021-03-21 03:51:28 +01:00
return $user->isAdmin() || $user->hasPermission('create_credit') || $user->hasPermission('create_all');
}
}