Skip to content

改为显式配置管理员账号 - #23

Merged
4evour merged 1 commit into
mainfrom
codex/pr-explicit-admin-bootstrap
Aug 22, 2026
Merged

改为显式配置管理员账号#23
4evour merged 1 commit into
mainfrom
codex/pr-explicit-admin-bootstrap

Conversation

@4evour

@4evour 4evour commented Aug 21, 2026

Copy link
Copy Markdown
Owner

迁移内容

  • 移除空数据库下自动把下一位注册用户提升为管理员的隐式规则
  • 用户名注册只按用户名白名单判断,邮箱注册只按邮箱白名单判断
  • README、API、部署文档与 Render 配置补充 TOURPASS_ADMIN_USERS
  • 增加显式管理员引导策略回归测试

行为变化

  • 未配置 TOURPASS_ADMIN_USERS:所有普通注册均为 user
  • 已配置:仅白名单中的用户名或邮箱在注册时成为 admin
  • 已存在用户的角色不受影响

验证

  • node tests/test_reviewed_admin_policy_contract.js
  • oxlint 管理员策略测试文件
  • MSVC Release 构建通过
  • CTest 1/1 通过
  • git diff --check

依赖关系

这是第 6 个堆叠 PR,基于容器健康 PR #22。请按 #18#19#20#21#22 → 本 PR 的顺序合并;前序合并后将本 PR 的目标分支改回 main。

部署提醒

需要管理员账号的环境必须在目标账号首次注册前配置 TOURPASS_ADMIN_USERS。该变量支持逗号分隔的用户名或邮箱。

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@4evour, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 27 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 45b07775-0303-4078-8f41-9c7b73730112

📥 Commits

Reviewing files that changed from the base of the PR and between 6ba74cd and 459aacd.

📒 Files selected for processing (7)
  • CHANGELOG.md
  • README.md
  • docs/api.md
  • docs/deployment.md
  • render.yaml
  • src/api.cpp
  • tests/test_reviewed_admin_policy_contract.js

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.

@4evour
4evour force-pushed the codex/pr-docker-agent-health branch from 31c5b80 to 1bfba6b Compare August 22, 2026 10:12
@4evour
4evour force-pushed the codex/pr-explicit-admin-bootstrap branch from 636010a to 459aacd Compare August 22, 2026 10:12
@4evour
4evour changed the base branch from codex/pr-docker-agent-health to main August 22, 2026 10:22
@4evour
4evour marked this pull request as ready for review August 22, 2026 10:22
@4evour
4evour merged commit 61dbbfc into main Aug 22, 2026
1 check passed
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