You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implements the tiered-access model (website ADR 0010): base access auto-granted on ORCID sign-in; service access (upload + compute) gated behind an admin grant that reviews GitHub + location/affiliation for export-control screening. Publishing keeps its own per-dataset approval.
Rationale: ORCID iDs are free to create, so ORCID-verified is not authorization to consume finite compute/storage (abuse-as-free-cloud risk); and NEMAR compute has export-control / local-jurisdiction restrictions requiring a human review of who/where.
Phase 1 — Base auto-approve + close the upload door (NOW)
New service-access axis on users (migration): closed by default.
Upload endpoint (POST /datasets, non-sandbox) requires service access; base users get a clear "service access required" response. Self-service sandbox no longer suffices.
Backfill/grandfather existing uploaders (approved + sandbox_completed, plus owner/admin) so prod users are not locked out.
Expose service-access flag + github-present on /auth/me so the frontend can gate the upload UI.
Seed test-owner/test-admin/test-user with service access so E2E upload tests keep passing.
Phase 2 — Admin grant flow + export-control review (LATER)
Admin endpoint to grant/revoke service access; requires github_username present; records reviewer + timestamp.
Admin review surface (in the admin-portal epic, website#158): shows the person's ORCID, GitHub, city/country, affiliation for export-control screening before granting.
Cross-repo homes for the deferred phases: the admin grant/review UI (Phase 2) lives in website admin-portal epic #158. The website upload-page gating + 'request upload access' flow lives in website upload epic #164. This nemar-cli epic owns the backend (grant/revoke endpoint, enforcement — Phase 1 shipped in #1015).
Operational note (from the dev→main promotion review, 2026-07-24): Phase 1 shipped the enforcement + grandfather backfill but NO in-product way to grant service_access. After the prod promotion, new ORCID signups land at base access and the only way to grant upload access is a manual D1 UPDATE until Phase 2:
wrangler d1 execute nemar-db --remote -c backend/wrangler-sccn.toml \
--command "UPDATE users SET service_access=1, service_access_granted_at=datetime('now') WHERE id=?"
Owner chose to promote as-is (deferring the grant mechanism to Phase 2). Phase 2's minimal backend slice = an owner/admin endpoint POST /admin/users/:id/service-access (require github_username, record granted_by/at) + a nemar admin CLI command, then the admin-portal review UI (website#158). This should be the first Phase 2 item so prod isn't stuck on raw D1 for long.
Activity
Merge pull request #1015 from nemarOrg/feature/issue-1013-phase1-serv…
neuromechanist commentedon Jul 24, 2026
Cross-repo homes for the deferred phases: the admin grant/review UI (Phase 2) lives in website admin-portal epic #158. The website upload-page gating + 'request upload access' flow lives in website upload epic #164. This nemar-cli epic owns the backend (grant/revoke endpoint, enforcement — Phase 1 shipped in #1015).
neuromechanist commentedon Jul 24, 2026
Operational note (from the dev→main promotion review, 2026-07-24): Phase 1 shipped the enforcement + grandfather backfill but NO in-product way to grant service_access. After the prod promotion, new ORCID signups land at base access and the only way to grant upload access is a manual D1 UPDATE until Phase 2:
Owner chose to promote as-is (deferring the grant mechanism to Phase 2). Phase 2's minimal backend slice = an owner/admin endpoint
POST /admin/users/:id/service-access(require github_username, record granted_by/at) + anemar adminCLI command, then the admin-portal review UI (website#158). This should be the first Phase 2 item so prod isn't stuck on raw D1 for long.