Repository navigation
Access allow-list: only approved people use JDWriter; others request access in the app - #84
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
…ccess in the app
CRU asked for app use to be gated by an approved list kept in the app,
not in Azure.
- Roles: Author now goes only to approved campus logins (new
AccessGrants table, migration AccessGrants) and to admins. Anyone
else who signs in gets no role. Every controller already requires
Author or Admin, so every endpoint refuses them. A test now
guards that no endpoint, apart from the user's own account and
sign-in, asks only for a signed-in user. It's read on every
request, so approving or removing someone takes effect on their
next page.
- Without access, you land on /request-access, with none of the app:
who you're signed in as, an optional note ("who you are and what
you'll use it for"), and Request access. Once asked, it says when,
offers Check again (a plain refetch, no polling) and lets you add to
the request. Asking again updates the open request.
- Requests reuse the reports system. Each is a ProblemReport of kind
Access in Back end → Reports, with Approve access (adds the sender's
login and resolves it) or Decline.
- Back end → Settings → "Who can use JDWriter":
- give access by login ID;
- the approved list, with Remove;
- "Signed in without access", those who asked first, each with
Approve, plus "Approve all N" for the switch-over.
- /api/user/me says when someone without access asked. New endpoints:
- POST api/user/access-request, for anyone signed in;
- GET/POST api/admin/access, DELETE api/admin/access/{login},
POST api/admin/access/approve-waiting and
POST api/admin/reports/{id}/approve-access, for admins.
- AGENTS.md records the decision and the role rule.
When this deploys, everyone but the admins needs approving. The
"Approve all" button on Settings does it in one go.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NDL3wis
force-pushed
the
feat/access-allow-list
branch
from
November 3, 2026 18:58
4635a3c to
e811328
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
CRU asked for access to JDWriter to be gated by an approved list kept in the app, not in Azure. People not on the list should be told to request access and be able to do it right there. Requests reuse the reports inbox from #83.
What changed
AccessGrants, migrationAccessGrants) and admins;Every_endpoint_but_the_users_own_account_and_sign_in_requires_a_rolefails if a controller ever asks only for a signed-in user./request-access: what someone without access sees, with none of the app around it./api/user/megainsaccessRequestedAt;POST api/user/access-request, for anyone signed in;GET/POST api/admin/access,DELETE api/admin/access/{login},POST api/admin/access/approve-waitingandPOST api/admin/reports/{id}/approve-access, for admins.Validation
Server:
dotnet test --filter "Category!=CorpusParity&Category!=LiveApi"passes 823 tests./mereports it, and approving resolves it; someone with access isn't filed; approval from the inbox; and the endpoint guard.Client: lint and
tsc -bare clean. Vitest passes 216 tests. New tests cover:Local, Chrome:
/request-access, and its direct/api/classescall returns 403;/api/classesreturns 200, and it doesn't get Back end.The test data was removed.
Deployment notes
🤖 Generated with Claude Code