-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Embargo #837
Fix Embargo #837
Conversation
A simple fix. Turns out this request turns everything except embargoed Dandisets by default. Need to add another search query (e.g. |
@CodyCBakerPhD Aside from the NIH Award Number stuff, can you confirm this is behaving as expected? You will need to update your JavaScript dependencies. |
When I try to create one one on staging I get this error dandi.es.js:199 Uncaught (in promise) Error: API is not authorized. Please provide a valid token.
at K.authorize (dandi.es.js:199:15)
at async K.init (dandi.es.js:182:7)
at async Button.onClick [as __onClick] (UploadsPage.js:122:17) But it's definitely the right credentials for staging |
I also can't see any of my embargoed Dandisets on the loose selector when my API keys are set |
Also this spams on the console (but not in dev tools view)
|
Sorry! Try again |
OK I can now see them in the selector One thing, not sure if you want to deal with it in this PR or a follow-up : the NIH grant number validation did not occur until I hit 'Submit' (I clicked off it and waited to see if that would trigger but it did not) and then it popped up very briefly but submission of the modal finished (would have expected the modal to stay open if there was an error) before I could fix it However, the dandiset did get created and seems fine. Maybe it would have problems at some level without the right kind of grant ID format, but the basic feature did work |
Let's handle the NIH grant number stuff before merging this PR, as this will enable embargo again. I'll start this in a linked follow-up. |
for more information, see https://pre-commit.ci
Alright invalid NIH grant numbers are properly blocked now! I'm going to skip the auto-parsing of the non-delimited string copied off NIH Reporter because DANDI itself does not accept this format directly. |
Cool CI tests failing now - you wanted to work on NIH number formatting on a separate branch/PR that gets merged into this one before merging either to main? |
for more information, see https://pre-commit.ci
Blocking Dandiset creation when the user provides an invalid NIH grant number has been implemented here. I'm actually going to skip the number formatting since DANDI does not allow this. Would it be correct here to assume we want to maintain parity between ourselves and DANDI? |
I think it's probably fine at this point, the other idea was a 'nicety' As per meeting; we can merge this whenever you're ready but I won't cut a new release until after user days |
Sounds good to me. Will need your review here |
This PR is an attempt to fix all issues relating to embargoed Dandisets.
I've been able to isolate the embargoed Dandiset issue to the fact that requesting
dandisets/?user=me
does not appear to return Dandisets that are embargoed. I'll start scouring the docs for an alternative request.Once this is complete, we can move on to #814.