mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 15:13:29 +01:00
27 lines
405 B
PHP
27 lines
405 B
PHP
<?php
|
|
|
|
namespace App\Policies;
|
|
|
|
use App\Models\User;
|
|
|
|
/**
|
|
* Class TaskPolicy
|
|
* @package App\Policies
|
|
*/
|
|
class TaskPolicy extends EntityPolicy
|
|
{
|
|
/**
|
|
* @param User $user
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function create(User $user)
|
|
{
|
|
if (! $this->createPermission($user, ENTITY_TASK))
|
|
return false;
|
|
|
|
|
|
return $user->hasFeature(FEATURE_TASKS);
|
|
}
|
|
}
|