Skip to content

WIP T244896#444

Merged
jsnshrmn merged 71 commits into
stagingfrom
dev-T244896
May 8, 2020
Merged

WIP T244896#444
jsnshrmn merged 71 commits into
stagingfrom
dev-T244896

Conversation

@jsnshrmn

@jsnshrmn jsnshrmn commented Apr 7, 2020

Copy link
Copy Markdown
Member

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.

jsnshrmn added 30 commits March 24, 2020 11:24
Comment thread TWLight/users/models.py Outdated
Comment thread TWLight/users/models.py Outdated
Comment thread TWLight/users/models.py Outdated
Comment thread TWLight/users/models.py Outdated
Comment thread TWLight/users/models.py Outdated
@Samwalton9

Samwalton9 commented May 8, 2020

Copy link
Copy Markdown
Member

Final TODO is that I need to reduce some duplicate auth-getting logic.
EDIT: Done!

@Samwalton9

Copy link
Copy Markdown
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

@jsnshrmn

jsnshrmn commented May 8, 2020

Copy link
Copy Markdown
Member Author

Will do. Thanks Sam!

@jsnshrmn
jsnshrmn merged commit 36a0a2b into staging May 8, 2020
@jsnshrmn
jsnshrmn deleted the dev-T244896 branch July 29, 2020 13:15
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