mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-16 16:13:20 +01:00
67c6ac1bc2
- Updated rules for storing credits - Fixed route controller - Added test for crud operations - Added new $invoice object in MockAccountData - Added & registered CreditPolicy
17 lines
347 B
PHP
17 lines
347 B
PHP
<?php
|
|
|
|
namespace App\Policies;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
|
|
|
class CreditPolicy extends EntityPolicy
|
|
{
|
|
use HandlesAuthorization;
|
|
|
|
public function create(User $user) : bool
|
|
{
|
|
return $user->isAdmin() || $user->hasPermission('create_quote') || $user->hasPermission('create_all');
|
|
}
|
|
}
|