<?php

declare(strict_types=1);

namespace App\Policies;

use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;

class QzCertificatePolicy
{
    use HandlesAuthorization;

    /**
     * Determine whether the user can view any certificates.
     */
    public function viewAny(User $user): bool
    {
        return $user->hasPermissionTo('manage settings');
    }

    /**
     * Determine whether the user can generate/regenerate certificates.
     */
    public function create(User $user): bool
    {
        return $user->hasPermissionTo('manage settings');
    }

    /**
     * Determine whether the user can delete certificates.
     */
    public function delete(User $user): bool
    {
        return $user->hasPermissionTo('manage settings');
    }
}
