WIP T244896#444
Merged
Merged
Conversation
… to manytomany in resources app.
… to manytomany in applications app.
… to manytomany in crosscutting tests.
… to manytomany in emails app.
… to manytomany in ezproxy app.
… to manytomany in graphs app.
… it at runtime in so many places.
Samwalton9
reviewed
May 7, 2020
Samwalton9
reviewed
May 7, 2020
Samwalton9
reviewed
May 7, 2020
Samwalton9
reviewed
May 7, 2020
Samwalton9
reviewed
May 7, 2020
Member
|
Final TODO is that I need to reduce some duplicate auth-getting logic. |
Member
|
Probably best to look at the overall diff here for today's commits since I did a lot of overwriting of previous changes: https://github.com/WikipediaLibrary/TWLight/compare/aa1d370..e854ffc |
Member
Author
|
Will do. Thanks Sam! |
…rs/authorizations.get_valid_partner_authorizations
…rtners conversion.
…ss for viewing sessions.
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.
https://phabricator.wikimedia.org/T244896
Changes partner field on Authorization from foreign key to many-to-many.
The idea here is that each bundle-eligible user would have a single authorization to cover all the resources included in the bundle.
We previously had
unique_together = ("user", "partner", "stream")for authorizations, but that's not possible with many to many relationships, so we'll need to add back in some constraints at the application layer.As part of this work, I discovered that we were missing pre_save validation on auths, so I've added that in since we need it.