Repository navigation
Conversation
Allow custodians to update and delete these records, with cancer type filter changes gated by dedicated permissions.
|
🎉 Great job! Your PR title follows the correct format. 🚀 |
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow custodians to update and delete these records, with cancer type filter changes gated by dedicated permissions.
Screenshots (if relevant)
Describe your changes
Project grants and cancer type filters can now be updated and deleted through the API, not only listed and created.
Project grants
PUT /api/v1/project_grants/{id} replaces the grant and stores a new version.
PATCH /api/v1/project_grants/{id} updates only the fields sent, on the latest version.
DELETE /api/v1/project_grants/{id} soft-deletes the grant and its versions.
Create, update, edit, and delete now go through ProjectGrantService.
Write routes use the existing project_grants.create, project_grants.update, and project_grants.delete permissions, and the controller still checks that the caller belongs to the grant's team.
Cancer type filters
POST, PUT, PATCH, and DELETE were added on /api/v1/cancer-type-filters.
level is derived from the parent. Moving a filter recalculates levels for its descendants, and a filter cannot be moved under itself or one of its descendants.
Deleting a filter also deletes its descendants.
New permissions cancer_type_filters.read, create, update, and delete are seeded and granted to custodian.team.admin, custodian.metadata.manager, and custodian.dar.manager. hdruk.superadmin already receives every permission. A migration adds the same permissions on existing databases.
GET list and show stay public.
Issue ticket link
Environment / Configuration changes (if applicable)
Requires migrations being run?
If not using the pre-push hook. Confirm tests pass:
Checklist before requesting a review