Skip to content
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

[feature] Close ERPC [OSF-7843] #7189

Merged

Conversation

caseyrollins
Copy link
Contributor

@caseyrollins caseyrollins commented May 5, 2017

Purpose

  • Close ERPC by preventing new draft registrations from being created with the ERPC metaschema.

Changes

  • Add enabled boolean field to MetaSchema model and serializer.
  • Update ensure_schemas() to use Django's update_or_create().
  • Prevent draft registrations from being created with disabled metaschemas (in APIv1 and APIv2).

Side Effects / Notes

  • Existing ERPC draft registrations will still be able to be registered. See ticket for discussion.
  • The /v2/metaschemas/ endpoint will return only active metaschemas that are of the latest version.
  • The /v2/metaschemas/<schema_id>/ endpoint will return any metaschema, including previous versions and inactive schemas.

QA Notes

  • Confirm ERPC draft registrations cannot be created on the OSF or through the API.
  • Confirm ERPC is not returned from /v2/metaschemas/
  • Confirm 200 (not 404) when requesting ERPC detail (/v2/metaschemas/<erpc_schema_id>/)

Ticket

@caseyrollins caseyrollins force-pushed the feature/close-erpc branch 3 times, most recently from 873532a to a59b547 Compare May 9, 2017 15:15
- Add active field to MetaSchema model and serializer.
- Prevent disabled draft registrations from being created via APIv1 and
APIv2.
- Set active=False on inactive metaschemas.
- Remove ACTIVE_META_SCHEMAS.
- Use update_or_create() in ensure_schemas()
@caseyrollins caseyrollins force-pushed the feature/close-erpc branch 3 times, most recently from 41ea0a7 to 9470551 Compare May 11, 2017 13:48
@caseyrollins caseyrollins changed the title [WIP] [feature] Close ERPC [OSF-7843] [feature] Close ERPC [OSF-7843] May 11, 2017
- Return active and latest metaschemas from list endpoint.
- Update metaschemas tests.
@brianjgeiger
Copy link
Collaborator

Oof. This didn't fare well in the Merge Conflict wars of '17.

@brianjgeiger brianjgeiger merged commit 35e1761 into CenterForOpenScience:develop Jun 5, 2017
@caseyrollins caseyrollins deleted the feature/close-erpc branch October 25, 2017 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants