invoiceninja/app/Policies/ExpensePolicy.php

22 lines
358 B
PHP
Raw Normal View History

2016-04-25 21:53:39 -04:00
<?php
namespace App\Policies;
2016-07-11 20:08:43 +03:00
use App\Models\User;
class ExpensePolicy extends EntityPolicy
{
/**
2017-01-30 21:49:42 +02:00
* @param User $user
2017-01-30 21:40:43 +02:00
*
2016-07-11 20:08:43 +03:00
* @return bool
*/
2019-01-30 22:00:26 +11:00
public function create(User $user)
2017-01-30 18:05:31 +02:00
{
2019-01-30 22:00:26 +11:00
if(!$this->createPermission($user, ENTITY_EXPENSE))
2016-07-11 20:08:43 +03:00
return false;
return $user->hasFeature(FEATURE_EXPENSES);
}
}