HoshiAI-be/app/Policies/LogPolicy.php
2025-11-10 22:47:08 +01:00

35 lines
656 B
PHP

<?php
namespace App\Policies;
use App\Models\Log;
use App\Models\User;
use Illuminate\Auth\Access\Response;
class LogPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->type === 'admin';
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Log $log): bool
{
return $user->type === 'admin';
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Log $log): bool
{
return $user->type === 'admin';
}
}