Files
Atomcms-edit/app/Policies/UserPolicy.php
T
2026-05-09 17:32:17 +02:00

55 lines
1.0 KiB
PHP
Executable File

<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
use Illuminate\Auth\Access\Response;
class UserPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*
* @return Response|bool
*/
public function viewAny(User $user)
{
return hasHousekeepingPermission('edit_user');
}
/**
* Determine whether the user can view the model.
*
* @return Response|bool
*/
public function view(User $user)
{
return hasHousekeepingPermission('edit_user');
}
/**
* Determine whether the user can update the model.
*
* @return Response|bool
*/
public function update(User $user)
{
return hasHousekeepingPermission('edit_user');
}
/**
* Determine whether the user can delete the model.
*
* @return Response|bool
*/
public function delete(User $user)
{
return hasHousekeepingPermission('delete_user');
}
}