wip
This commit is contained in:
1 parent
29018914d1
commit
8cb1d428cb
17 files changed
+214
-165
No files matched your search
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user