<?php

namespace App\Policies;

use App\Http\Controllers\Marketplace\MarketplaceController;
use App\Models\User;

class MarketplacePolicy
{
    public function viewAny(User $user): bool
    {
        return $user->can('MARKETPLACE_VIEW') || $user->can('MARKETPLACE_BROWSE');
    }

    public function view(User $user): bool
    {
        return $user->can('MARKETPLACE_BROWSE');
    }

    public function install(User $user): bool
    {
        return $user->can('MODULES_INSTALL');
    }
}
