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