mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
26 lines
393 B
PHP
26 lines
393 B
PHP
<?php
|
|
|
|
namespace App\Policies;
|
|
|
|
use App\Models\Quote;
|
|
use App\Models\User;
|
|
|
|
/**
|
|
* Class QuotePolicy
|
|
* @package App\Policies
|
|
*/
|
|
class QuotePolicy extends EntityPolicy
|
|
{
|
|
/**
|
|
* Checks if the user has create permissions
|
|
*
|
|
* @param User $user
|
|
* @return bool
|
|
*/
|
|
public function create(User $user) : bool
|
|
{
|
|
return $user->isAdmin() || $user->hasPermission('create_quote');
|
|
}
|
|
|
|
}
|