Repository navigation
STUDY_ALLOW: route only the listed studies - #506
Merged
Merged
Conversation
A deployment could exclude studies (STUDY_DENY) but not limit itself to a few. STUDY_ALLOW, when set, makes isRestrictedStudy() treat every study it doesn't list as restricted, so those studies are never routed and no surface can reach them, the same way STUDY_DENY excludes studies. A listed study is still subject to STUDY_DENY and the restricted-name rule, and STUDY_ALLOW_RESTRICTED does not widen the list. Unset or empty, nothing changes. It is an /admin-editable setting validated like STUDY_DENY. Verified: test/study-allow.test.ts covers each case (11 tests); removing the new check makes 3 of them fail. settings-overrides covers validation. npm test otherwise matches master (the same 8 environment-dependent failures on both), eslint and tsc are clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
alisman
enabled auto-merge
November 29, 2026 23:05
alisman
disabled auto-merge
November 29, 2026 23:05
This branch was successfully deployed
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.
What
A new
STUDY_ALLOWsetting: a comma- or space-separated list of study ids. When it's set,isRestrictedStudy()treats every study not on the list as restricted. That means those studies are never routed, so no surface can reach them (the study picker, a?doc=link, a federation call), the same waySTUDY_DENYexcludes studies.STUDY_DENYand the restricted-name rule.STUDY_ALLOW_RESTRICTED=1doesn't widen the list.It's editable in
/adminand validated likeSTUDY_DENY. Documented indocs/ENVIRONMENT.md.Why
The MSK deployment (cbiolab.cbioportal.aws.mskcc.org) now reads the full MSK portal database, which holds ~1,700 studies, but should only serve
mskimpactandmsktarget. A deny list would have to name every other study and would let new ones through; an allow list doesn't.Verified
test/study-allow.test.ts: a table of 11 cases (listed / not listed / prefix isn't a match /STUDY_DENYstill wins / restricted names stay restricted). Removing the new check makes 3 of them fail.test/settings-overrides.test.ts:STUDY_ALLOWvalidation (refuses a bad id, accepts a list and empty).npm teston this branch matchesmaster: the same 8 failures on both (materialized-statement and snapshot tests that depend on my local environment), plus 11 new passing tests.eslintandtsc --noEmitclean.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.