add policies
This commit is contained in:
70
app/Modules/CardPinOrder/Policies/CardPinOrderPolicy.php
Normal file
70
app/Modules/CardPinOrder/Policies/CardPinOrderPolicy.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Modules\CardPinOrder\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use App\Modules\CardPinOrder\Models\CardPinOrder;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class CardPinOrderPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:CardPinOrder');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser, CardPinOrder $cardPinOrder): bool
|
||||
{
|
||||
return $authUser->can('View:CardPinOrder');
|
||||
}
|
||||
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Create:CardPinOrder');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser, CardPinOrder $cardPinOrder): bool
|
||||
{
|
||||
return $authUser->can('Update:CardPinOrder');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser, CardPinOrder $cardPinOrder): bool
|
||||
{
|
||||
return $authUser->can('Delete:CardPinOrder');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser, CardPinOrder $cardPinOrder): bool
|
||||
{
|
||||
return $authUser->can('Restore:CardPinOrder');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser, CardPinOrder $cardPinOrder): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:CardPinOrder');
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:CardPinOrder');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:CardPinOrder');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, CardPinOrder $cardPinOrder): bool
|
||||
{
|
||||
return $authUser->can('Replicate:CardPinOrder');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:CardPinOrder');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user