Skip to content

Hide Google Captcha from the customer-facing module lists - #83

Merged
HafizMMoaz merged 1 commit into
mainfrom
fix/hide-superadmin-modules-from-pricing
Jul 23, 2026
Merged

Hide Google Captcha from the customer-facing module lists#83
HafizMMoaz merged 1 commit into
mainfrom
fix/hide-superadmin-modules-from-pricing

Conversation

@HafizMMoaz

Copy link
Copy Markdown
Member

Report

On the landing pricing page, Google Captcha showed up as one of the plan features (a plan read like 29/30 Enabled with captcha as a row). Captcha is super-admin-only: it guards the platform's own login and registration, is configured solely in super admin settings (superadmin-setting.ts, permission manage-google-captcha-settings), and has no company-side screen. Customers should never see it as a purchasable feature.

Root cause and fix

The core already curates User::$superadmin_activated_module for exactly this: platform modules the super admin owns, which every customer-facing list filters out (ProductService, LandingPage). The pricing page, the marketplace, and the plan builder all filter whereNotIn('module', $superadmin_activated_module). Captcha simply was not in the list.

Fix is to add GoogleCaptcha to that one list, so pricing, marketplace, and the plan builder are all corrected together, rather than special-casing the pricing controller.

Why this is safe

  • Company modules settings page is unaffected. It sources from Plan::getUserSubscriptionModules (plan entitlement), not this list, so captcha does not appear there.
  • The always-active side effect is inert for captcha. ActivatedModule() merges this list into a company's active modules, but captcha has no company menu and its only route requires a super-admin permission, so nothing changes for a company user.

Verified on the rendered page

Loaded /pricing locally and read the Inertia props:

rendered activeModules count: 29   (was 30)
GoogleCaptcha present: False

Related, not changed here (needs a product call)

Three other modules have the identical super-admin-only shape (super-admin settings, no company menu) and are still listed on pricing: Paypal, Stripe, Webhook. Paypal/Stripe are the platform's subscription payment gateways, Webhook is platform infrastructure. Hiding them is the same one-line change (add to the same list), but whether they should be marketed as plan features is a product decision, so I left them and am flagging it.

🤖 Generated with Claude Code

Google Captcha was showing as a purchasable feature on the landing pricing
page (and the marketplace and plan builder), so a plan read e.g. 29/30 with
captcha as one of the rows. Captcha is not a per-company feature: it guards
the platform's own login and registration, is configured only in super admin
settings, and has no company side screen.

The core already keeps a list of super-admin-owned platform modules,
$superadmin_activated_module, that every customer-facing module list filters
out (ProductService, LandingPage). GoogleCaptcha belongs in it for the same
reason, so this adds it there rather than special-casing the pricing page,
which fixes the marketplace and plan builder in the same stroke. Verified on
the rendered /pricing page: the module count drops from 30 to 29 and captcha
no longer appears; the company modules settings page is unaffected because it
reads plan entitlement, not this list.
@HafizMMoaz
HafizMMoaz requested a review from a team as a code owner July 23, 2026 22:31
@HafizMMoaz
HafizMMoaz merged commit b70c7c1 into main Jul 23, 2026
1 check passed
@HafizMMoaz
HafizMMoaz deleted the fix/hide-superadmin-modules-from-pricing branch July 23, 2026 22:33
@HafizMMoaz HafizMMoaz mentioned this pull request Jul 23, 2026
HafizMMoaz added a commit that referenced this pull request Jul 23, 2026
One fix since v1.3.1: hide Google Captcha from the customer-facing module
lists (pricing, marketplace, plan builder), since it is a super-admin-only
platform module (#83). PHP-only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant