70 lines
1.8 KiB
PHP
70 lines
1.8 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Policies;
|
|
|
|
use Illuminate\Foundation\Auth\User as AuthUser;
|
|
use App\Models\StatistikoDetail;
|
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
|
|
|
class StatistikoDetailPolicy
|
|
{
|
|
use HandlesAuthorization;
|
|
|
|
public function viewAny(AuthUser $authUser): bool
|
|
{
|
|
return $authUser->can('ViewAny:StatistikoDetail');
|
|
}
|
|
|
|
public function view(AuthUser $authUser, StatistikoDetail $statistikoDetail): bool
|
|
{
|
|
return $authUser->can('View:StatistikoDetail');
|
|
}
|
|
|
|
public function create(AuthUser $authUser): bool
|
|
{
|
|
return $authUser->can('Create:StatistikoDetail');
|
|
}
|
|
|
|
public function update(AuthUser $authUser, StatistikoDetail $statistikoDetail): bool
|
|
{
|
|
return $authUser->can('Update:StatistikoDetail');
|
|
}
|
|
|
|
public function delete(AuthUser $authUser, StatistikoDetail $statistikoDetail): bool
|
|
{
|
|
return $authUser->can('Delete:StatistikoDetail');
|
|
}
|
|
|
|
public function restore(AuthUser $authUser, StatistikoDetail $statistikoDetail): bool
|
|
{
|
|
return $authUser->can('Restore:StatistikoDetail');
|
|
}
|
|
|
|
public function forceDelete(AuthUser $authUser, StatistikoDetail $statistikoDetail): bool
|
|
{
|
|
return $authUser->can('ForceDelete:StatistikoDetail');
|
|
}
|
|
|
|
public function forceDeleteAny(AuthUser $authUser): bool
|
|
{
|
|
return $authUser->can('ForceDeleteAny:StatistikoDetail');
|
|
}
|
|
|
|
public function restoreAny(AuthUser $authUser): bool
|
|
{
|
|
return $authUser->can('RestoreAny:StatistikoDetail');
|
|
}
|
|
|
|
public function replicate(AuthUser $authUser, StatistikoDetail $statistikoDetail): bool
|
|
{
|
|
return $authUser->can('Replicate:StatistikoDetail');
|
|
}
|
|
|
|
public function reorder(AuthUser $authUser): bool
|
|
{
|
|
return $authUser->can('Reorder:StatistikoDetail');
|
|
}
|
|
|
|
} |