basic comparatore completed
This commit is contained in:
1 parent
cbdc6aff47
commit
16cc214db6
80 files changed
+2413
-2794
No files matched your search
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use App\Models\Bettype;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class BettypePolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:Bettype');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser, Bettype $bettype): bool
|
||||
{
|
||||
return $authUser->can('View:Bettype');
|
||||
}
|
||||
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Create:Bettype');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser, Bettype $bettype): bool
|
||||
{
|
||||
return $authUser->can('Update:Bettype');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser, Bettype $bettype): bool
|
||||
{
|
||||
return $authUser->can('Delete:Bettype');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser, Bettype $bettype): bool
|
||||
{
|
||||
return $authUser->can('Restore:Bettype');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser, Bettype $bettype): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:Bettype');
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:Bettype');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:Bettype');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, Bettype $bettype): bool
|
||||
{
|
||||
return $authUser->can('Replicate:Bettype');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:Bettype');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?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');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?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');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use App\Models\CompetitionGroupFilter;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class CompetitionGroupFilterPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:CompetitionGroupFilter');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser, CompetitionGroupFilter $competitionGroupFilter): bool
|
||||
{
|
||||
return $authUser->can('View:CompetitionGroupFilter');
|
||||
}
|
||||
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Create:CompetitionGroupFilter');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser, CompetitionGroupFilter $competitionGroupFilter): bool
|
||||
{
|
||||
return $authUser->can('Update:CompetitionGroupFilter');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser, CompetitionGroupFilter $competitionGroupFilter): bool
|
||||
{
|
||||
return $authUser->can('Delete:CompetitionGroupFilter');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser, CompetitionGroupFilter $competitionGroupFilter): bool
|
||||
{
|
||||
return $authUser->can('Restore:CompetitionGroupFilter');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser, CompetitionGroupFilter $competitionGroupFilter): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:CompetitionGroupFilter');
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:CompetitionGroupFilter');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:CompetitionGroupFilter');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, CompetitionGroupFilter $competitionGroupFilter): bool
|
||||
{
|
||||
return $authUser->can('Replicate:CompetitionGroupFilter');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:CompetitionGroupFilter');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?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');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use App\Models\ElementFilter;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class ElementFilterPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:ElementFilter');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser, ElementFilter $elementFilter): bool
|
||||
{
|
||||
return $authUser->can('View:ElementFilter');
|
||||
}
|
||||
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Create:ElementFilter');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser, ElementFilter $elementFilter): bool
|
||||
{
|
||||
return $authUser->can('Update:ElementFilter');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser, ElementFilter $elementFilter): bool
|
||||
{
|
||||
return $authUser->can('Delete:ElementFilter');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser, ElementFilter $elementFilter): bool
|
||||
{
|
||||
return $authUser->can('Restore:ElementFilter');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser, ElementFilter $elementFilter): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:ElementFilter');
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:ElementFilter');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:ElementFilter');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, ElementFilter $elementFilter): bool
|
||||
{
|
||||
return $authUser->can('Replicate:ElementFilter');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:ElementFilter');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?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');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use App\Models\GroupFilter;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class GroupFilterPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:GroupFilter');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser, GroupFilter $groupFilter): bool
|
||||
{
|
||||
return $authUser->can('View:GroupFilter');
|
||||
}
|
||||
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Create:GroupFilter');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser, GroupFilter $groupFilter): bool
|
||||
{
|
||||
return $authUser->can('Update:GroupFilter');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser, GroupFilter $groupFilter): bool
|
||||
{
|
||||
return $authUser->can('Delete:GroupFilter');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser, GroupFilter $groupFilter): bool
|
||||
{
|
||||
return $authUser->can('Restore:GroupFilter');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser, GroupFilter $groupFilter): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:GroupFilter');
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:GroupFilter');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:GroupFilter');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, GroupFilter $groupFilter): bool
|
||||
{
|
||||
return $authUser->can('Replicate:GroupFilter');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:GroupFilter');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use App\Models\MultilineClient;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class MultilineClientPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:MultilineClient');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser, MultilineClient $multilineClient): bool
|
||||
{
|
||||
return $authUser->can('View:MultilineClient');
|
||||
}
|
||||
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Create:MultilineClient');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser, MultilineClient $multilineClient): bool
|
||||
{
|
||||
return $authUser->can('Update:MultilineClient');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser, MultilineClient $multilineClient): bool
|
||||
{
|
||||
return $authUser->can('Delete:MultilineClient');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser, MultilineClient $multilineClient): bool
|
||||
{
|
||||
return $authUser->can('Restore:MultilineClient');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser, MultilineClient $multilineClient): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:MultilineClient');
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:MultilineClient');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:MultilineClient');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, MultilineClient $multilineClient): bool
|
||||
{
|
||||
return $authUser->can('Replicate:MultilineClient');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:MultilineClient');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use App\Models\MultilineSetting;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class MultilineSettingPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:MultilineSetting');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser, MultilineSetting $multilineSetting): bool
|
||||
{
|
||||
return $authUser->can('View:MultilineSetting');
|
||||
}
|
||||
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Create:MultilineSetting');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser, MultilineSetting $multilineSetting): bool
|
||||
{
|
||||
return $authUser->can('Update:MultilineSetting');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser, MultilineSetting $multilineSetting): bool
|
||||
{
|
||||
return $authUser->can('Delete:MultilineSetting');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser, MultilineSetting $multilineSetting): bool
|
||||
{
|
||||
return $authUser->can('Restore:MultilineSetting');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser, MultilineSetting $multilineSetting): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:MultilineSetting');
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:MultilineSetting');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:MultilineSetting');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, MultilineSetting $multilineSetting): bool
|
||||
{
|
||||
return $authUser->can('Replicate:MultilineSetting');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:MultilineSetting');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?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');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?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');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?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');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?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');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<?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