https://github.com/ga4gh/dockstore
Revision 8c4d0bc0590a155641f93ad769d5ae3bd32e7bab authored by Andy Chen on 13 August 2020, 17:16:48 UTC, committed by GitHub on 13 August 2020, 17:16:48 UTC
Delete rejected and pending organizations

dockstore/dockstore#3254

Implemented a new endpoint '/{organizationId}/' in
OrganizationResource to delete a non-approved organization

API call now allow users to delete their own organizations only if
they are part of the organization, the organization is pending or
rejected, and that their role in the organization is 'MAINTAINER'

API call also allows for admins/curators to delete any rejected or
pending organizations regardless whether or not the admins/curators are
part of

New endpoint would remove rows having a foreign key constraint
before removing the organization from the database

Added a orphanRemove parameter to 'users' in Organization.java in order
to address and delete the organizationid FKEY instead of CASCADE as
CascadeType.REMOVE or CascadeType.ALL does not always remove
child entities using organizationid

Implemented a new method in EventDAO.java to delete a list of events
having a specific organizationId

Added a new NamedQuery to Event.java to execute the SQL statement of
deleting events based on a given organizationId

Added a @Consumes annotation for 'createOrganization' in order to
specify the content-type header as application/json so the test would
pass

Added a new test and stubObject for the new endpoint

Included additional tests for testing the functionality of this endpoint
1 parent dc8dfcf
History
Tip revision: 8c4d0bc0590a155641f93ad769d5ae3bd32e7bab authored by Andy Chen on 13 August 2020, 17:16:48 UTC
Delete non-approved organizations (#3725)
Tip revision: 8c4d0bc

README.md

back to top