Skip to content

fix(web/default): hide sign-up link when password registration disabled - #5118

Open
feitianbubu wants to merge 1 commit into
QuantumNous:mainfrom
feitianbubu:pr/02879d0d08fbc5ccceb18150b8e8c9754f921f63
Open

fix(web/default): hide sign-up link when password registration disabled#5118
feitianbubu wants to merge 1 commit into
QuantumNous:mainfrom
feitianbubu:pr/02879d0d08fbc5ccceb18150b8e8c9754f921f63

Conversation

@feitianbubu

@feitianbubu feitianbubu commented May 26, 2026

Copy link
Copy Markdown
Member

⚠️ 提交说明 / PR Notice

关闭密码注册后
在登录框上面还会显示注册链接

📝 变更描述 / Description

判断如果当前设置是关闭密码注册的, 则隐藏注册链接

📸 运行证明 / Proof of Work

后台设置:
image

修改前:
image

修改后:
image

@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The SignIn component's sign-up prompt visibility condition is extended to require both general registration and password-based registration to be enabled. The prompt now checks status?.password_register_enabled !== false in addition to the existing status?.register_enabled !== false requirement, preventing the prompt from appearing when password registration is disabled.

Changes

Sign-up Prompt Registration Gate

Layer / File(s) Summary
Password registration enabled condition
web/default/src/features/auth/sign-in/index.tsx
The sign-up prompt visibility condition now requires both status?.register_enabled !== false and status?.password_register_enabled !== false to be true before rendering the "Don't have an account? Sign up" link.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • QuantumNous/new-api#4871: Adds the password_register_enabled field to the /api/status endpoint that this PR consumes for gating the sign-up prompt.

Suggested reviewers

  • Calcium-Ion

Poem

🐰 A gate within a gate we weave,
Password checks now stand reprieve,
Sign-up prompts must pass them through,
Registration flags both old and new!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: hiding the sign-up link when password registration is disabled, which matches the code modification and PR objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@panjinhe panjinhe left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed by Codex: small focused fix, checks passing.

@panjinhe

Copy link
Copy Markdown

Please disregard my previous approval on this PR. It was submitted by mistake while I was checking the wrong repository.

@Calcium-Ion
Calcium-Ion force-pushed the main branch 2 times, most recently from 51fdfc5 to 2b6f1df Compare August 30, 2026 15:03
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.

2 participants