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

Fix permission deletion #5336

Merged
merged 5 commits into from
Mar 2, 2020
Merged

Conversation

jisantuc
Copy link
Contributor

@jisantuc jisantuc commented Feb 29, 2020

Overview

This PR fixes bugs where:

  • deleting permissions for the only user an annotation project had been shared with went down an exceptional path (from replacePermissions's perspective)
  • deleting all of the permissions for a project returned a surprise 404 because of the completeWithOneOrFail directive

Checklist

  • Description of PR is in an appropriate section of the changelog and grouped with similar changes if possible

Notes

Fixes an issue I encountered while testing raster-foundry/annotate#681

Testing Instructions

  • share with exactly one user using the share endpoint
  • try to delete permissions you added for that user
  • it should succeed

Copy link
Contributor

@Lknechtli Lknechtli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting, I never ran into issues when deleting permissions for the last user. I definitely tested that case 🤔
seems to work fine though, and looks cleaner 👍

@jisantuc jisantuc merged commit d7ae84f into develop Mar 2, 2020
@jisantuc jisantuc deleted the bugfix/js/fix-permission-deletion branch March 2, 2020 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants