mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 13:42:49 +01:00
Fix for archiving API token
This commit is contained in:
parent
128921e512
commit
40836a249b
@ -2,12 +2,14 @@
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
class TokenPolicy extends EntityPolicy {
|
||||
public static function edit($user, $item) {
|
||||
public static function edit(User $user, $item) {
|
||||
return $user->hasPermission('admin');
|
||||
}
|
||||
|
||||
public static function create($user) {
|
||||
public static function create(User $user) {
|
||||
return $user->hasPermission('admin');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class AuthServiceProvider extends ServiceProvider
|
||||
\App\Models\Product::class => \App\Policies\ProductPolicy::class,
|
||||
\App\Models\TaxRate::class => \App\Policies\TaxRatePolicy::class,
|
||||
\App\Models\AccountGateway::class => \App\Policies\AccountGatewayPolicy::class,
|
||||
\App\Models\Token::class => \App\Policies\TokenPolicy::class,
|
||||
\App\Models\AccountToken::class => \App\Policies\TokenPolicy::class,
|
||||
\App\Models\BankAccount::class => \App\Policies\BankAccountPolicy::class,
|
||||
\App\Models\PaymentTerm::class => \App\Policies\PaymentTermPolicy::class,
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user