mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-16 08:02:40 +01:00
17 lines
309 B
PHP
17 lines
309 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Policies;
|
||
|
|
||
|
use App\Models\User;
|
||
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
||
|
|
||
|
class DocumentPolicy extends EntityPolicy
|
||
|
{
|
||
|
use HandlesAuthorization;
|
||
|
|
||
|
public function create(User $user) : bool
|
||
|
{
|
||
|
return $user->isAdmin() || $user->hasPermission('create_all');
|
||
|
}
|
||
|
}
|