Skip to content

Commit 75847cf

Browse files
fix: keep form signup toggle label static (#42167)
## Description In **Admin Settings → Authentication → Form login**, the signup toggle (`isSignupDisabled`) rendered its label from the current value: "Allow only invited users to signup" when signup is disabled, "Allow all users to signup" when enabled. Because the label restated the current state, toggling the switch appeared to change the option itself — a customer looking for the "invited users" option couldn't find it while it was enabled, and open signup kept adding unintended members (and paid seats) to their org. This PR makes the label static — **"Allow all users to signup"** — so it describes what the setting does: switch ON = anyone can sign up, switch OFF = only invited users can sign up. This matches the static-label pattern of the sibling toggles on the same page ("Enable form login", "Enable email verification") and keeps the accessible name of the switch stable across activation. Behavior of the setting itself is unchanged; this is label-only. ### Call sites checked - `toggleText` is only consumed by `FieldToggleWithToggleText` in `app/client/src/pages/AdminSettings/FormGroup/Toggle.tsx`; `isSignupDisabled` was the only setting supplying a value-dependent one. - No Cypress spec or locator references either label string (the signup toggle locator is testid-based: `[data-testid='isSignupDisabled']`). - EE imports `FormAuth` from `ce/` with no override, so this CE-only change flows to EE via the hourly sync (verified it applies cleanly). ### Tests - New unit test `app/client/src/ce/pages/AdminSettings/config/authentication.test.tsx`: asserts the label is state-independent and pins the exact wording. Verified red against the pre-fix source, green after. - Full `src/pages/AdminSettings` jest scope passes (13 suites, 39 tests). Fixes https://linear.app/appsmith/issue/APP-15855 ## Automation /ok-to-test tags="@tag.All" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/33033481965> > Commit: b7d0192 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=33033481965&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Thu, 27 Aug 2026 03:33:10 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Updated the signup setting label to consistently display “Allow all users to signup,” regardless of the toggle state. * **Tests** * Added coverage to verify the signup setting label remains consistent when toggled. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 4a70a0f commit 75847cf

2 files changed

Lines changed: 22 additions & 4 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { FormAuth } from "./authentication";
2+
3+
describe("FormAuth form signup toggle", () => {
4+
it("has a label that does not change with the toggle state", () => {
5+
const signupSetting = FormAuth.settings?.find(
6+
(setting) => setting.id === "isSignupDisabled",
7+
);
8+
9+
expect(signupSetting).toBeDefined();
10+
// The toggle text must describe what the setting does, not the current
11+
// state — a state-dependent label reads as the option itself changing.
12+
expect(signupSetting?.toggleText?.(true)).toEqual(
13+
signupSetting?.toggleText?.(false),
14+
);
15+
// Pin the wording: the label must describe the ON state (open signup).
16+
// A static "invited only" label would invert the meaning of the switch.
17+
expect(signupSetting?.toggleText?.(false)).toEqual(
18+
"Allow all users to signup",
19+
);
20+
});
21+
});

app/client/src/ce/pages/AdminSettings/config/authentication.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,7 @@ export const FormAuth: AdminConfigType = {
6161
category: SettingCategories.FORM_AUTH,
6262
controlType: SettingTypes.TOGGLE,
6363
label: "Form signup",
64-
toggleText: (value: boolean) =>
65-
value
66-
? "Allow only invited users to signup"
67-
: "Allow all users to signup",
64+
toggleText: () => "Allow all users to signup",
6865
},
6966
{
7067
id: "emailVerificationEnabled",

0 commit comments

Comments
 (0)