-
Notifications
You must be signed in to change notification settings - Fork 12
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
Restrict updates to metadata access
field
#1954
Conversation
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.
I had two questions, but if the answers are what I think, they don't block approval and merge of this PR:
- The new test that checks for non-mutability of the access field relies solely on the addition of
access
to thecomputed_fields
list inVersion.strip_metadata()
, right? - There is no added test to see whether the correct access field value pops out of an embargoed Dandiset--is that already covered by existing tests (i.e., those tests unaffected by adding
access
as an immutable field)?
As I said, aside from those questions... LGTM.
cfcd508
to
c832cd7
Compare
This PR has changed slightly, as I realized that there are sometimes other sub-fields in |
access
fieldaccess
field
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.
Just one improvement that I think can be made to a comment, otherwise this makes sense and lgtm
aa4916e
to
070d42d
Compare
🚀 PR was released in |
Closes #1787
Closes #1831
It seems both these issues were due to us not prohibiting the
access
field from being updated. A user should never update theaccess
field (as it is derived from the embargo status of the dandiset), nor is there a natural way for that to happen using the meditor. However, it was not actually disallowed in anyway, so the following situations were possible:This PR updates that field to treat it as(See below)computed
and thus not able to be changed from a simple metadata update.