wip
This commit is contained in:
1 parent
29018914d1
commit
8cb1d428cb
17 files changed
+214
-165
No files matched your search
@@ -1,66 +1,70 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use App\Models\SofaScoreCategory;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Access\Response;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class SofaScoreCategoryPolicy
|
||||
{
|
||||
/**
|
||||
* Determine whether the user can view any models.
|
||||
*/
|
||||
public function viewAny(User $user): bool
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return false;
|
||||
return $authUser->can('ViewAny:SofaScoreCategory');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can view the model.
|
||||
*/
|
||||
public function view(User $user, SofaScoreCategory $sofaScoreCategory): bool
|
||||
public function view(AuthUser $authUser, SofaScoreCategory $sofaScoreCategory): bool
|
||||
{
|
||||
return false;
|
||||
return $authUser->can('View:SofaScoreCategory');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can create models.
|
||||
*/
|
||||
public function create(User $user): bool
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return false;
|
||||
return $authUser->can('Create:SofaScoreCategory');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can update the model.
|
||||
*/
|
||||
public function update(User $user, SofaScoreCategory $sofaScoreCategory): bool
|
||||
public function update(AuthUser $authUser, SofaScoreCategory $sofaScoreCategory): bool
|
||||
{
|
||||
return false;
|
||||
return $authUser->can('Update:SofaScoreCategory');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can delete the model.
|
||||
*/
|
||||
public function delete(User $user, SofaScoreCategory $sofaScoreCategory): bool
|
||||
public function delete(AuthUser $authUser, SofaScoreCategory $sofaScoreCategory): bool
|
||||
{
|
||||
return false;
|
||||
return $authUser->can('Delete:SofaScoreCategory');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can restore the model.
|
||||
*/
|
||||
public function restore(User $user, SofaScoreCategory $sofaScoreCategory): bool
|
||||
public function restore(AuthUser $authUser, SofaScoreCategory $sofaScoreCategory): bool
|
||||
{
|
||||
return false;
|
||||
return $authUser->can('Restore:SofaScoreCategory');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can permanently delete the model.
|
||||
*/
|
||||
public function forceDelete(User $user, SofaScoreCategory $sofaScoreCategory): bool
|
||||
public function forceDelete(AuthUser $authUser, SofaScoreCategory $sofaScoreCategory): bool
|
||||
{
|
||||
return false;
|
||||
return $authUser->can('ForceDelete:SofaScoreCategory');
|
||||
}
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:SofaScoreCategory');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:SofaScoreCategory');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, SofaScoreCategory $sofaScoreCategory): bool
|
||||
{
|
||||
return $authUser->can('Replicate:SofaScoreCategory');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:SofaScoreCategory');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,20 +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\SofaScoreRosa;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class SofaScoreRosaPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:SofaScoreRosa');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser): bool
|
||||
public function view(AuthUser $authUser, SofaScoreRosa $sofaScoreRosa): bool
|
||||
{
|
||||
return $authUser->can('View:SofaScoreRosa');
|
||||
}
|
||||
@@ -24,22 +27,22 @@ class SofaScoreRosaPolicy
|
||||
return $authUser->can('Create:SofaScoreRosa');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser): bool
|
||||
public function update(AuthUser $authUser, SofaScoreRosa $sofaScoreRosa): bool
|
||||
{
|
||||
return $authUser->can('Update:SofaScoreRosa');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser): bool
|
||||
public function delete(AuthUser $authUser, SofaScoreRosa $sofaScoreRosa): bool
|
||||
{
|
||||
return $authUser->can('Delete:SofaScoreRosa');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser): bool
|
||||
public function restore(AuthUser $authUser, SofaScoreRosa $sofaScoreRosa): bool
|
||||
{
|
||||
return $authUser->can('Restore:SofaScoreRosa');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser): bool
|
||||
public function forceDelete(AuthUser $authUser, SofaScoreRosa $sofaScoreRosa): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:SofaScoreRosa');
|
||||
}
|
||||
@@ -54,7 +57,7 @@ class SofaScoreRosaPolicy
|
||||
return $authUser->can('RestoreAny:SofaScoreRosa');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser): bool
|
||||
public function replicate(AuthUser $authUser, SofaScoreRosa $sofaScoreRosa): bool
|
||||
{
|
||||
return $authUser->can('Replicate:SofaScoreRosa');
|
||||
}
|
||||
@@ -63,4 +66,5 @@ class SofaScoreRosaPolicy
|
||||
{
|
||||
return $authUser->can('Reorder:SofaScoreRosa');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,20 +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\SofaScoreTask;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class SofaScoreTaskPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:SofaScoreTask');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser): bool
|
||||
public function view(AuthUser $authUser, SofaScoreTask $sofaScoreTask): bool
|
||||
{
|
||||
return $authUser->can('View:SofaScoreTask');
|
||||
}
|
||||
@@ -24,22 +27,22 @@ class SofaScoreTaskPolicy
|
||||
return $authUser->can('Create:SofaScoreTask');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser): bool
|
||||
public function update(AuthUser $authUser, SofaScoreTask $sofaScoreTask): bool
|
||||
{
|
||||
return $authUser->can('Update:SofaScoreTask');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser): bool
|
||||
public function delete(AuthUser $authUser, SofaScoreTask $sofaScoreTask): bool
|
||||
{
|
||||
return $authUser->can('Delete:SofaScoreTask');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser): bool
|
||||
public function restore(AuthUser $authUser, SofaScoreTask $sofaScoreTask): bool
|
||||
{
|
||||
return $authUser->can('Restore:SofaScoreTask');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser): bool
|
||||
public function forceDelete(AuthUser $authUser, SofaScoreTask $sofaScoreTask): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:SofaScoreTask');
|
||||
}
|
||||
@@ -54,7 +57,7 @@ class SofaScoreTaskPolicy
|
||||
return $authUser->can('RestoreAny:SofaScoreTask');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser): bool
|
||||
public function replicate(AuthUser $authUser, SofaScoreTask $sofaScoreTask): bool
|
||||
{
|
||||
return $authUser->can('Replicate:SofaScoreTask');
|
||||
}
|
||||
@@ -63,4 +66,5 @@ class SofaScoreTaskPolicy
|
||||
{
|
||||
return $authUser->can('Reorder:SofaScoreTask');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,20 +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\SofaScoreTournament;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class SofaScoreTournamentPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:SofaScoreTournament');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser): bool
|
||||
public function view(AuthUser $authUser, SofaScoreTournament $sofaScoreTournament): bool
|
||||
{
|
||||
return $authUser->can('View:SofaScoreTournament');
|
||||
}
|
||||
@@ -24,22 +27,22 @@ class SofaScoreTournamentPolicy
|
||||
return $authUser->can('Create:SofaScoreTournament');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser): bool
|
||||
public function update(AuthUser $authUser, SofaScoreTournament $sofaScoreTournament): bool
|
||||
{
|
||||
return $authUser->can('Update:SofaScoreTournament');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser): bool
|
||||
public function delete(AuthUser $authUser, SofaScoreTournament $sofaScoreTournament): bool
|
||||
{
|
||||
return $authUser->can('Delete:SofaScoreTournament');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser): bool
|
||||
public function restore(AuthUser $authUser, SofaScoreTournament $sofaScoreTournament): bool
|
||||
{
|
||||
return $authUser->can('Restore:SofaScoreTournament');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser): bool
|
||||
public function forceDelete(AuthUser $authUser, SofaScoreTournament $sofaScoreTournament): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:SofaScoreTournament');
|
||||
}
|
||||
@@ -54,7 +57,7 @@ class SofaScoreTournamentPolicy
|
||||
return $authUser->can('RestoreAny:SofaScoreTournament');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser): bool
|
||||
public function replicate(AuthUser $authUser, SofaScoreTournament $sofaScoreTournament): bool
|
||||
{
|
||||
return $authUser->can('Replicate:SofaScoreTournament');
|
||||
}
|
||||
@@ -63,4 +66,5 @@ class SofaScoreTournamentPolicy
|
||||
{
|
||||
return $authUser->can('Reorder:SofaScoreTournament');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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\StatisticFixtures;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class StatisticFixturesPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:StatisticFixtures');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser): bool
|
||||
public function view(AuthUser $authUser, StatisticFixtures $statisticFixtures): bool
|
||||
{
|
||||
return $authUser->can('View:StatisticFixtures');
|
||||
}
|
||||
@@ -25,22 +27,22 @@ class StatisticFixturesPolicy
|
||||
return $authUser->can('Create:StatisticFixtures');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser): bool
|
||||
public function update(AuthUser $authUser, StatisticFixtures $statisticFixtures): bool
|
||||
{
|
||||
return $authUser->can('Update:StatisticFixtures');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser): bool
|
||||
public function delete(AuthUser $authUser, StatisticFixtures $statisticFixtures): bool
|
||||
{
|
||||
return $authUser->can('Delete:StatisticFixtures');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser): bool
|
||||
public function restore(AuthUser $authUser, StatisticFixtures $statisticFixtures): bool
|
||||
{
|
||||
return $authUser->can('Restore:StatisticFixtures');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser): bool
|
||||
public function forceDelete(AuthUser $authUser, StatisticFixtures $statisticFixtures): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:StatisticFixtures');
|
||||
}
|
||||
@@ -55,7 +57,7 @@ class StatisticFixturesPolicy
|
||||
return $authUser->can('RestoreAny:StatisticFixtures');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser): bool
|
||||
public function replicate(AuthUser $authUser, StatisticFixtures $statisticFixtures): bool
|
||||
{
|
||||
return $authUser->can('Replicate:StatisticFixtures');
|
||||
}
|
||||
@@ -64,4 +66,5 @@ class StatisticFixturesPolicy
|
||||
{
|
||||
return $authUser->can('Reorder:StatisticFixtures');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,66 +1,70 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use App\Models\StatistikoConfig;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Access\Response;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class StatistikoConfigPolicy
|
||||
{
|
||||
/**
|
||||
* Determine whether the user can view any models.
|
||||
*/
|
||||
public function viewAny(User $user): bool
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return false;
|
||||
return $authUser->can('ViewAny:StatistikoConfig');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can view the model.
|
||||
*/
|
||||
public function view(User $user, StatistikoConfig $statistikoConfig): bool
|
||||
public function view(AuthUser $authUser, StatistikoConfig $statistikoConfig): bool
|
||||
{
|
||||
return false;
|
||||
return $authUser->can('View:StatistikoConfig');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can create models.
|
||||
*/
|
||||
public function create(User $user): bool
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return false;
|
||||
return $authUser->can('Create:StatistikoConfig');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can update the model.
|
||||
*/
|
||||
public function update(User $user, StatistikoConfig $statistikoConfig): bool
|
||||
public function update(AuthUser $authUser, StatistikoConfig $statistikoConfig): bool
|
||||
{
|
||||
return false;
|
||||
return $authUser->can('Update:StatistikoConfig');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can delete the model.
|
||||
*/
|
||||
public function delete(User $user, StatistikoConfig $statistikoConfig): bool
|
||||
public function delete(AuthUser $authUser, StatistikoConfig $statistikoConfig): bool
|
||||
{
|
||||
return false;
|
||||
return $authUser->can('Delete:StatistikoConfig');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can restore the model.
|
||||
*/
|
||||
public function restore(User $user, StatistikoConfig $statistikoConfig): bool
|
||||
public function restore(AuthUser $authUser, StatistikoConfig $statistikoConfig): bool
|
||||
{
|
||||
return false;
|
||||
return $authUser->can('Restore:StatistikoConfig');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can permanently delete the model.
|
||||
*/
|
||||
public function forceDelete(User $user, StatistikoConfig $statistikoConfig): bool
|
||||
public function forceDelete(AuthUser $authUser, StatistikoConfig $statistikoConfig): bool
|
||||
{
|
||||
return false;
|
||||
return $authUser->can('ForceDelete:StatistikoConfig');
|
||||
}
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:StatistikoConfig');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:StatistikoConfig');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, StatistikoConfig $statistikoConfig): bool
|
||||
{
|
||||
return $authUser->can('Replicate:StatistikoConfig');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:StatistikoConfig');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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\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): bool
|
||||
public function view(AuthUser $authUser, StatistikoDetail $statistikoDetail): bool
|
||||
{
|
||||
return $authUser->can('View:StatistikoDetail');
|
||||
}
|
||||
@@ -25,22 +27,22 @@ class StatistikoDetailPolicy
|
||||
return $authUser->can('Create:StatistikoDetail');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser): bool
|
||||
public function update(AuthUser $authUser, StatistikoDetail $statistikoDetail): bool
|
||||
{
|
||||
return $authUser->can('Update:StatistikoDetail');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser): bool
|
||||
public function delete(AuthUser $authUser, StatistikoDetail $statistikoDetail): bool
|
||||
{
|
||||
return $authUser->can('Delete:StatistikoDetail');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser): bool
|
||||
public function restore(AuthUser $authUser, StatistikoDetail $statistikoDetail): bool
|
||||
{
|
||||
return $authUser->can('Restore:StatistikoDetail');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser): bool
|
||||
public function forceDelete(AuthUser $authUser, StatistikoDetail $statistikoDetail): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:StatistikoDetail');
|
||||
}
|
||||
@@ -55,7 +57,7 @@ class StatistikoDetailPolicy
|
||||
return $authUser->can('RestoreAny:StatistikoDetail');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser): bool
|
||||
public function replicate(AuthUser $authUser, StatistikoDetail $statistikoDetail): bool
|
||||
{
|
||||
return $authUser->can('Replicate:StatistikoDetail');
|
||||
}
|
||||
@@ -64,4 +66,5 @@ class StatistikoDetailPolicy
|
||||
{
|
||||
return $authUser->can('Reorder:StatistikoDetail');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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\StatistikoImport;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class StatistikoImportPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:StatistikoImport');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser): bool
|
||||
public function view(AuthUser $authUser, StatistikoImport $statistikoImport): bool
|
||||
{
|
||||
return $authUser->can('View:StatistikoImport');
|
||||
}
|
||||
@@ -25,22 +27,22 @@ class StatistikoImportPolicy
|
||||
return $authUser->can('Create:StatistikoImport');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser): bool
|
||||
public function update(AuthUser $authUser, StatistikoImport $statistikoImport): bool
|
||||
{
|
||||
return $authUser->can('Update:StatistikoImport');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser): bool
|
||||
public function delete(AuthUser $authUser, StatistikoImport $statistikoImport): bool
|
||||
{
|
||||
return $authUser->can('Delete:StatistikoImport');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser): bool
|
||||
public function restore(AuthUser $authUser, StatistikoImport $statistikoImport): bool
|
||||
{
|
||||
return $authUser->can('Restore:StatistikoImport');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser): bool
|
||||
public function forceDelete(AuthUser $authUser, StatistikoImport $statistikoImport): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:StatistikoImport');
|
||||
}
|
||||
@@ -55,7 +57,7 @@ class StatistikoImportPolicy
|
||||
return $authUser->can('RestoreAny:StatistikoImport');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser): bool
|
||||
public function replicate(AuthUser $authUser, StatistikoImport $statistikoImport): bool
|
||||
{
|
||||
return $authUser->can('Replicate:StatistikoImport');
|
||||
}
|
||||
@@ -64,4 +66,5 @@ class StatistikoImportPolicy
|
||||
{
|
||||
return $authUser->can('Reorder:StatistikoImport');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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\StatistikoPlayer;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class StatistikoPlayerPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:StatistikoPlayer');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser): bool
|
||||
public function view(AuthUser $authUser, StatistikoPlayer $statistikoPlayer): bool
|
||||
{
|
||||
return $authUser->can('View:StatistikoPlayer');
|
||||
}
|
||||
@@ -25,22 +27,22 @@ class StatistikoPlayerPolicy
|
||||
return $authUser->can('Create:StatistikoPlayer');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser): bool
|
||||
public function update(AuthUser $authUser, StatistikoPlayer $statistikoPlayer): bool
|
||||
{
|
||||
return $authUser->can('Update:StatistikoPlayer');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser): bool
|
||||
public function delete(AuthUser $authUser, StatistikoPlayer $statistikoPlayer): bool
|
||||
{
|
||||
return $authUser->can('Delete:StatistikoPlayer');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser): bool
|
||||
public function restore(AuthUser $authUser, StatistikoPlayer $statistikoPlayer): bool
|
||||
{
|
||||
return $authUser->can('Restore:StatistikoPlayer');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser): bool
|
||||
public function forceDelete(AuthUser $authUser, StatistikoPlayer $statistikoPlayer): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:StatistikoPlayer');
|
||||
}
|
||||
@@ -55,7 +57,7 @@ class StatistikoPlayerPolicy
|
||||
return $authUser->can('RestoreAny:StatistikoPlayer');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser): bool
|
||||
public function replicate(AuthUser $authUser, StatistikoPlayer $statistikoPlayer): bool
|
||||
{
|
||||
return $authUser->can('Replicate:StatistikoPlayer');
|
||||
}
|
||||
@@ -64,4 +66,5 @@ class StatistikoPlayerPolicy
|
||||
{
|
||||
return $authUser->can('Reorder:StatistikoPlayer');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user