-
Notifications
You must be signed in to change notification settings - Fork 13
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
Derive asset access
field from asset blob
#2010
Conversation
Determine if asset is open access or embargoed based on if the asset blob is embargoed.
The This also made me realize we're just storing the |
Since the |
I'm open to this. If the full metadata can be derived from the "small" metadata, I think leaving it as is would be ok too. But let's discuss next week. |
I think that would be ok. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just need the migration for the audit record table 👍
Published assets actually MUST have this field present, and so removing it here would violate a check constraint
PR gained approval 3 weeks ago. @jjnesbitt is there anything else to be done here or could be just merged? |
This will require a migration; as such I'll move it back to draft status. |
I have added to the PR description the TODO "section" with a checkbox for migration. Would be great if similar approach is adopted for other PRs to make it clear(er) on what outstanding TODOs left. |
🚀 PR was released in |
Closes #1997
Previously, this field was left unaltered, which meant it assumed whatever value was provided during creation through the API. This meant a default of
dandi:OpenAccess
most of the time, but it could have actually had any value. This has led to almost all of the currently embargoed assets to mistakenly display anaccess
value ofdandi:OpenAccess
.This PR changes this behavior by instead using the asset blob
embargoed
field to determine the value of 'access'.TODO