This commit is contained in:
salam committed 2026-10-08 15:33:05 +02:00
1 parent 29018914d1
commit 8cb1d428cb
17 files changed
+214 -165

No files matched your search

+13 -10
View File
@@ -1,21 +1,23 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Auth\Access\HandlesAuthorization;
use Illuminate\Foundation\Auth\User as AuthUser;
use App\Models\StatistikoEvent;
use Illuminate\Auth\Access\HandlesAuthorization;
class StatistikoEventPolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:StatistikoEvent');
}
public function view(AuthUser $authUser): bool
public function view(AuthUser $authUser, StatistikoEvent $statistikoEvent): bool
{
return $authUser->can('View:StatistikoEvent');
}
@@ -25,22 +27,22 @@ class StatistikoEventPolicy
return $authUser->can('Create:StatistikoEvent');
}
public function update(AuthUser $authUser): bool
public function update(AuthUser $authUser, StatistikoEvent $statistikoEvent): bool
{
return $authUser->can('Update:StatistikoEvent');
}
public function delete(AuthUser $authUser): bool
public function delete(AuthUser $authUser, StatistikoEvent $statistikoEvent): bool
{
return $authUser->can('Delete:StatistikoEvent');
}
public function restore(AuthUser $authUser): bool
public function restore(AuthUser $authUser, StatistikoEvent $statistikoEvent): bool
{
return $authUser->can('Restore:StatistikoEvent');
}
public function forceDelete(AuthUser $authUser): bool
public function forceDelete(AuthUser $authUser, StatistikoEvent $statistikoEvent): bool
{
return $authUser->can('ForceDelete:StatistikoEvent');
}
@@ -55,7 +57,7 @@ class StatistikoEventPolicy
return $authUser->can('RestoreAny:StatistikoEvent');
}
public function replicate(AuthUser $authUser): bool
public function replicate(AuthUser $authUser, StatistikoEvent $statistikoEvent): bool
{
return $authUser->can('Replicate:StatistikoEvent');
}
@@ -64,4 +66,5 @@ class StatistikoEventPolicy
{
return $authUser->can('Reorder:StatistikoEvent');
}
}
}