1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00
invoiceninja/app/Policies/UserPolicy.php
2019-04-27 19:20:03 +10:00

26 lines
391 B
PHP

<?php
namespace App\Policies;
use App\Models\Client;
use App\Models\User;
/**
* Class UserPolicy
* @package App\Policies
*/
class UserPolicy 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_user');
}
}