@@ -925,20 +925,16 @@ def _is_entity_locked_against_update(existing_entity_dict):
925925 entity_type = existing_entity_dict ['entity_type' ]
926926 if entity_type in ['Publication' ,'Dataset' ]:
927927 if 'status' in existing_entity_dict and existing_entity_dict ['status' ] == 'Published' :
928- raise schema_errors .LockedEntityUpdateException (f"{ entity_type } cannot be modified, due to"
929- f" status={ existing_entity_dict ['status' ]} ." )
928+ raise schema_errors .LockedEntityUpdateException (f"Permission denied to change a published/public { entity_type } ." )
930929 elif entity_type in ['Donor' ,'Sample' ]:
931930 if 'data_access_level' in existing_entity_dict and existing_entity_dict ['data_access_level' ] == 'public' :
932- raise schema_errors .LockedEntityUpdateException (f"{ entity_type } cannot be modified, due to"
933- f" data_access_level={ existing_entity_dict ['data_access_level' ]} ." )
931+ raise schema_errors .LockedEntityUpdateException (f"Permission denied to change a published/public { entity_type } ." )
934932 elif entity_type in ['Collection' ,'Epicollection' ]:
935933 if 'doi_url' in existing_entity_dict and existing_entity_dict ['doi_url' ]:
936- raise schema_errors .LockedEntityUpdateException (f"{ entity_type } cannot be modified, due to"
937- f" doi_url={ existing_entity_dict ['doi_url' ]} ." )
934+ raise schema_errors .LockedEntityUpdateException (f"Permission denied to change a published/public { entity_type } ." )
938935 # Probably never get here, since doi_url and registered_doi must be set as a pair.
939936 if 'registered_doi' in existing_entity_dict and existing_entity_dict ['registered_doi' ]:
940- raise schema_errors .LockedEntityUpdateException (f"{ entity_type } cannot be modified, due to"
941- f" registered_doi={ existing_entity_dict ['registered_doi' ]} ." )
937+ raise schema_errors .LockedEntityUpdateException (f"Permission denied to change a published/public { entity_type } ." )
942938 else :
943939 entity_uuid = existing_entity_dict ['uuid' ]
944940 raise schema_errors .LockedEntityUpdateException (f'Unable to check if { entity_type } for { entity_uuid } is locked!' )
0 commit comments