Hide Google Captcha from the customer-facing module lists - #83
Merged
Conversation
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.
Merged
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Report
On the landing pricing page, Google Captcha showed up as one of the plan features (a plan read like
29/30 Enabledwith 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, permissionmanage-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_modulefor 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 filterwhereNotIn('module', $superadmin_activated_module). Captcha simply was not in the list.Fix is to add
GoogleCaptchato 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
Plan::getUserSubscriptionModules(plan entitlement), not this list, so captcha does not appear there.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
/pricinglocally and read the Inertia props: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