Files
roxane/app/Policies/UserPolicy.php

67 lines
1.4 KiB
PHP
Raw Permalink Normal View History

2026-02-03 11:57:36 +01:00
<?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');
}
}