help wip
This commit is contained in:
1 parent
3791379c41
commit
ec5a56a9b1
27 files changed
+514
-143
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\Help;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class HelpPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:Help');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser, Help $help): bool
|
||||
{
|
||||
return $authUser->can('View:Help');
|
||||
}
|
||||
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Create:Help');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser, Help $help): bool
|
||||
{
|
||||
return $authUser->can('Update:Help');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser, Help $help): bool
|
||||
{
|
||||
return $authUser->can('Delete:Help');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser, Help $help): bool
|
||||
{
|
||||
return $authUser->can('Restore:Help');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser, Help $help): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:Help');
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:Help');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:Help');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, Help $help): bool
|
||||
{
|
||||
return $authUser->can('Replicate:Help');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:Help');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user