removed shield use superadmin
This commit is contained in:
1 parent
7fd7f706bc
commit
419148cd18
60 files changed
+611
-2363
No files matched your search
@@ -1,70 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use App\Models\Bookmaker;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class BookmakerPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:Bookmaker');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser, Bookmaker $bookmaker): bool
|
||||
{
|
||||
return $authUser->can('View:Bookmaker');
|
||||
}
|
||||
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Create:Bookmaker');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser, Bookmaker $bookmaker): bool
|
||||
{
|
||||
return $authUser->can('Update:Bookmaker');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser, Bookmaker $bookmaker): bool
|
||||
{
|
||||
return $authUser->can('Delete:Bookmaker');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser, Bookmaker $bookmaker): bool
|
||||
{
|
||||
return $authUser->can('Restore:Bookmaker');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser, Bookmaker $bookmaker): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:Bookmaker');
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:Bookmaker');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:Bookmaker');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, Bookmaker $bookmaker): bool
|
||||
{
|
||||
return $authUser->can('Replicate:Bookmaker');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:Bookmaker');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use App\Models\Client;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class ClientPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:Client');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser, Client $client): bool
|
||||
{
|
||||
return $authUser->can('View:Client');
|
||||
}
|
||||
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Create:Client');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser, Client $client): bool
|
||||
{
|
||||
return $authUser->can('Update:Client');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser, Client $client): bool
|
||||
{
|
||||
return $authUser->can('Delete:Client');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser, Client $client): bool
|
||||
{
|
||||
return $authUser->can('Restore:Client');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser, Client $client): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:Client');
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:Client');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:Client');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, Client $client): bool
|
||||
{
|
||||
return $authUser->can('Replicate:Client');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:Client');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use App\Models\Country;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class CountryPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:Country');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser, Country $country): bool
|
||||
{
|
||||
return $authUser->can('View:Country');
|
||||
}
|
||||
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Create:Country');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser, Country $country): bool
|
||||
{
|
||||
return $authUser->can('Update:Country');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser, Country $country): bool
|
||||
{
|
||||
return $authUser->can('Delete:Country');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser, Country $country): bool
|
||||
{
|
||||
return $authUser->can('Restore:Country');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser, Country $country): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:Country');
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:Country');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:Country');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, Country $country): bool
|
||||
{
|
||||
return $authUser->can('Replicate:Country');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:Country');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use App\Models\Event;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class EventPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:Event');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser, Event $event): bool
|
||||
{
|
||||
return $authUser->can('View:Event');
|
||||
}
|
||||
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Create:Event');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser, Event $event): bool
|
||||
{
|
||||
return $authUser->can('Update:Event');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser, Event $event): bool
|
||||
{
|
||||
return $authUser->can('Delete:Event');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser, Event $event): bool
|
||||
{
|
||||
return $authUser->can('Restore:Event');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser, Event $event): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:Event');
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:Event');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:Event');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, Event $event): bool
|
||||
{
|
||||
return $authUser->can('Replicate:Event');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:Event');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use App\Models\Provider;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class ProviderPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:Provider');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser, Provider $provider): bool
|
||||
{
|
||||
return $authUser->can('View:Provider');
|
||||
}
|
||||
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Create:Provider');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser, Provider $provider): bool
|
||||
{
|
||||
return $authUser->can('Update:Provider');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser, Provider $provider): bool
|
||||
{
|
||||
return $authUser->can('Delete:Provider');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser, Provider $provider): bool
|
||||
{
|
||||
return $authUser->can('Restore:Provider');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser, Provider $provider): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:Provider');
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:Provider');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:Provider');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, Provider $provider): bool
|
||||
{
|
||||
return $authUser->can('Replicate:Provider');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:Provider');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use Spatie\Permission\Models\Role;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class RolePolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:Role');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser, Role $role): bool
|
||||
{
|
||||
return $authUser->can('View:Role');
|
||||
}
|
||||
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Create:Role');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser, Role $role): bool
|
||||
{
|
||||
return $authUser->can('Update:Role');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser, Role $role): bool
|
||||
{
|
||||
return $authUser->can('Delete:Role');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser, Role $role): bool
|
||||
{
|
||||
return $authUser->can('Restore:Role');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser, Role $role): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:Role');
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:Role');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:Role');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, Role $role): bool
|
||||
{
|
||||
return $authUser->can('Replicate:Role');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:Role');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use App\Models\Sport;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class SportPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:Sport');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser, Sport $sport): bool
|
||||
{
|
||||
return $authUser->can('View:Sport');
|
||||
}
|
||||
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Create:Sport');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser, Sport $sport): bool
|
||||
{
|
||||
return $authUser->can('Update:Sport');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser, Sport $sport): bool
|
||||
{
|
||||
return $authUser->can('Delete:Sport');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser, Sport $sport): bool
|
||||
{
|
||||
return $authUser->can('Restore:Sport');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser, Sport $sport): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:Sport');
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:Sport');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:Sport');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, Sport $sport): bool
|
||||
{
|
||||
return $authUser->can('Replicate:Sport');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:Sport');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use App\Models\Supervisor;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class SupervisorPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:Supervisor');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser, Supervisor $supervisor): bool
|
||||
{
|
||||
return $authUser->can('View:Supervisor');
|
||||
}
|
||||
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Create:Supervisor');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser, Supervisor $supervisor): bool
|
||||
{
|
||||
return $authUser->can('Update:Supervisor');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser, Supervisor $supervisor): bool
|
||||
{
|
||||
return $authUser->can('Delete:Supervisor');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser, Supervisor $supervisor): bool
|
||||
{
|
||||
return $authUser->can('Restore:Supervisor');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser, Supervisor $supervisor): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:Supervisor');
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:Supervisor');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:Supervisor');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, Supervisor $supervisor): bool
|
||||
{
|
||||
return $authUser->can('Replicate:Supervisor');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:Supervisor');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class UserPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:User');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('View:User');
|
||||
}
|
||||
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Create:User');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Update:User');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Delete:User');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Restore:User');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:User');
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:User');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:User');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Replicate:User');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:User');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user