Skip to content

Lock published/public entities from update #815

@shirey

Description

@shirey

On entity PUT calls if:
Publication.status == 'Published' or
Dataset.status == 'Published' or
Donor.data_access_level == 'public' or
Sample.data_access_level == 'public' or
Collection.doi_url is not (null or empty) or
Collection.registered_doi is not (null or empty) or
EPICollection.doi_url is not (null or empty) or
EPICollection.registered_doi is not (null or empty)

Reject the update with a 403 with the message "Permission denied on changing a published/public entity".

If an additional header of "X-HuBMAP-Update-Override: Override-Key <new secret override key specified in config file>" is found and the secret key matches the configured value, allow overwriting.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions