Cloud admin: user and access management panel
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- firebase, typescript
- Lĩnh vực
- authentication, authorization, database, frontend
Hướng nghiên cứu
Start by reading src/App.tsx and src/App.test.tsx for route registration and MemoryRouter tests, then inspect the GlyphDebug route, AddWorkspaceDialog, ConfirmDialog, and the existing config/defaults and security-rule paths. The work is done when the /admin flow covers the listed allowlist, domain, user, quota, account, and defaults operations, with visible errors, confirmations, mutation coverage, and a clean TypeScript check.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Admin panel for managing who may sign in and what limits they get. All operations are plain
Firestore writes gated by isAdmin() in the security rules — no Cloud Functions required.
Scope
- New
/adminroute registered insrc/App.tsx. Must be declared before the*catch-all,
which currently redirects everything unmatched to/editor. Lazy-loaded, following the existing
src/routes/GlyphDebug.tsxpattern (that route plus its CSS module are the only members of
src/routes/today). - Guarded on
role === 'admin'; non-admins are redirected to/editor. The route guard is
convenience only — the security rules are the actual enforcement. - Manage the email allowlist: add, remove, list. Emails normalised to lowercase on write.
- Manage allowed domains: add, remove, list (e.g.
adventuresinlua.com), so a whole
organisation can be admitted without listing individuals. - Manage users: set per-user
quotaBytes(default 25 MB) andmaxFiles(default 2000),
disable/enable an account, promote/demote admin. - Editing
config/defaultsso new users get a different default quota and file cap.
Acceptance criteria
-
/adminroute added before the*catch-all inApp.tsx, lazy-loaded - Non-admins cannot reach the panel and are redirected
- Allowlist entries can be added, listed, and removed; emails are lowercased
- Allowed domains can be added, listed, and removed
- Per-user
quotaBytesandmaxFilesare editable and take effect without the user re-signing-in - Accounts can be disabled and re-enabled; a disabled user loses access
- Admin can be granted and revoked; an admin cannot demote themselves into lockout
-
config/defaultsis editable from the panel - Destructive actions (remove user, revoke admin, disable) confirm first
- Errors surface visibly rather than failing silently
- Route wiring tested with the
MemoryRouterpattern insrc/App.test.tsx -
npx tsc -p lua-learning-website/tsconfig.app.json --noEmitclean - Scoped mutation coverage >= 80%
Implementation notes
src/App.test.tsxis the template for route tests:<MemoryRouter initialEntries={[...]}>
with the heavy componentvi.mocked to a stub.- There is no shared UI primitives directory in this repo. Reuse
src/components/AddWorkspaceDialog/AddWorkspaceDialog.tsxas the form pattern (controlled
inputs with<label htmlFor>,role="alert"errors,isFormValidgating a disabled submit)
andsrc/components/ConfirmDialog/for destructive confirmations. - Use theme custom properties from
src/styles/themes.css. - Keep business logic in hooks, not components —
CLAUDE.mdrequires UI components stay pure.
Watch the 400-line-per-file lint cap; split the panel into sub-components early. e2e/tab-persistence.spec.ts:233navigates to/docs, which is not a declared route and
silently redirects. Harmless, but a reminder that route order matters here.
Depends on
- #789
Branching
This issue is part of the Cloud Accounts & Storage
milestone, which uses feat/cloud as its integration branch.
Branch from feat/cloud, and open the PR against feat/cloud. Never against main.
Create the branch (the --base flag also sets the default PR target for this branch):
gh issue develop <number> --base feat/cloud --checkout
Open the PR:
python3 scripts/issue-review.py <number> --base feat/cloud \
--summary "<summary>" --test-plan "<test-plan>"
feat/cloud merges to main in a single PR once the milestone is complete.
Why both flags are required: gh issue develop without --base branches from the repository
default branch (main), and scripts/issue-review.py falls back to main when --base is
omitted — both for the gh pr create target and for the changed-file list in the PR body.
- Ngôn ngữ chính
- TypeScript
- Star
- 1
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của jcollard/LuaInTheWeb
-
tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
jcollard/LuaInTheWeb#752 ·
-
tech-debt
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
jcollard/LuaInTheWeb#690 ·
-
tech-debt
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
jcollard/LuaInTheWeb#590 ·
-
tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
jcollard/LuaInTheWeb#518 ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
jcollard/LuaInTheWeb#235 ·
Tất cả issue của jcollard/LuaInTheWeb
Issue tương tự
-
[Bug]: Pen taps on sidebar rows start a drag and lose their clickCó thể đã có người làm @makhnatkin đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
b310-digital/teammapper#1515 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
puckeditor/puck#1884 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
outline/outline#14378 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nicobailon/pi-web-access#642 ·
Maintainer thường phản hồi trong vòng 1 ngày