<?php

namespace App\Policies;

use App\Models\User;
use App\Models\WaTemplate;

class WaTemplatePolicy
{
    public function viewAny(User $user): bool
    {
        return $user->can('settings.manage');
    }

    public function update(User $user, WaTemplate $template): bool
    {
        return $user->can('settings.manage') && $template->tenant_id === $user->tenant_id;
    }
}
