Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.8
2.5.0
12 changes: 4 additions & 8 deletions src/schema/schema_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -925,20 +925,16 @@ def _is_entity_locked_against_update(existing_entity_dict):
entity_type = existing_entity_dict['entity_type']
if entity_type in ['Publication','Dataset']:
if 'status' in existing_entity_dict and existing_entity_dict['status'] == 'Published':
raise schema_errors.LockedEntityUpdateException(f"{entity_type} cannot be modified, due to"
f" status={existing_entity_dict['status']}.")
raise schema_errors.LockedEntityUpdateException(f"Permission denied to change a published/public {entity_type}.")
elif entity_type in ['Donor','Sample']:
if 'data_access_level' in existing_entity_dict and existing_entity_dict['data_access_level'] == 'public':
raise schema_errors.LockedEntityUpdateException(f"{entity_type} cannot be modified, due to"
f" data_access_level={existing_entity_dict['data_access_level']}.")
raise schema_errors.LockedEntityUpdateException(f"Permission denied to change a published/public {entity_type}.")
elif entity_type in ['Collection','Epicollection']:
if 'doi_url' in existing_entity_dict and existing_entity_dict['doi_url']:
raise schema_errors.LockedEntityUpdateException(f"{entity_type} cannot be modified, due to"
f" doi_url={existing_entity_dict['doi_url']}.")
raise schema_errors.LockedEntityUpdateException(f"Permission denied to change a published/public {entity_type}.")
# Probably never get here, since doi_url and registered_doi must be set as a pair.
if 'registered_doi' in existing_entity_dict and existing_entity_dict['registered_doi']:
raise schema_errors.LockedEntityUpdateException(f"{entity_type} cannot be modified, due to"
f" registered_doi={existing_entity_dict['registered_doi']}.")
raise schema_errors.LockedEntityUpdateException(f"Permission denied to change a published/public {entity_type}.")
else:
entity_uuid = existing_entity_dict['uuid']
raise schema_errors.LockedEntityUpdateException(f'Unable to check if {entity_type} for {entity_uuid} is locked!')
6 changes: 3 additions & 3 deletions src/uwsgi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ module = wsgi:application
# Send logs to stdout instead of file so docker picks it up and writes to AWS CloudWatch
log-master=true

# Master with 16 worker processes (based on CPU number)
# Master with 12 worker processes (based on CPU number)
master = true
processes = 16
processes = 12

# Enable the multithreading within uWSGI
# Launch the application across multiple threads inside each process
enable-threads = True
threads = 16
threads = 24

# Use http socket for integration with nginx running on the same machine
socket = localhost:5000
Expand Down