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

Run hasher migration on swapped models #1147

Merged
merged 2 commits into from
Jun 3, 2022

Conversation

josephabrahams
Copy link
Member

@josephabrahams josephabrahams commented Apr 27, 2022

Fixes #1146

Description of the Change

Run client secret hasher migration on custom application model.

Checklist

  • PR only contains one change (considered splitting up PR)
  • unit-test added
  • documentation updated
  • CHANGELOG.md updated (only for user relevant changes)
  • author name in AUTHORS

@codecov
Copy link

codecov bot commented Apr 27, 2022

Codecov Report

Merging #1147 (307d07d) into master (307d07d) will not change coverage.
The diff coverage is n/a.

❗ Current head 307d07d differs from pull request most recent head f1f8293. Consider uploading reports for the commit f1f8293 to get more accurate results

@@           Coverage Diff           @@
##           master    #1147   +/-   ##
=======================================
  Coverage   96.90%   96.90%           
=======================================
  Files          31       31           
  Lines        1812     1812           
=======================================
  Hits         1756     1756           
  Misses         56       56           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 307d07d...f1f8293. Read the comment docs.

Copy link
Member

@n2ygk n2ygk left a comment

Choose a reason for hiding this comment

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

What do you think about making the migration work correctly for swapped models?

@n2ygk n2ygk added this to the 2.0.1 milestone Apr 27, 2022
@josephabrahams
Copy link
Member Author

@n2ygk Updated per #1146 (comment). Additionally used _default_manager as objects can't be guaranteed on swapped models.

@n2ygk
Copy link
Member

n2ygk commented May 27, 2022

@josephabrahams sorry I went and rebased while you were working on it. I'll step away until you mark this as ready for review.

@josephabrahams josephabrahams force-pushed the fix-swappable-migration branch 2 times, most recently from e6da5e6 to f1210ef Compare May 28, 2022 00:10
@josephabrahams josephabrahams changed the title WIP: Only run hasher migration on non-swapped models. Only run hasher migration on non-swapped models. May 28, 2022
@josephabrahams josephabrahams changed the title Only run hasher migration on non-swapped models. Run hasher migration on non-swapped models. May 28, 2022
@josephabrahams josephabrahams changed the title Run hasher migration on non-swapped models. Run hasher migration on swapped models May 28, 2022
@josephabrahams
Copy link
Member Author

@n2ygk No worries! I rebased and took a stab at a test. Please let me know what you think.

@josephabrahams josephabrahams requested a review from n2ygk May 31, 2022 23:03
@n2ygk n2ygk modified the milestones: 2.0.1, 2.1.0 Jun 3, 2022
n2ygk referenced this pull request Jun 3, 2022
* Add ClientSecretField field to use Django password hashing algorithms (#1020)

Co-authored-by: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com>
Co-authored-by: Peter Karman <pkarman@users.noreply.github.com>
Co-authored-by: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com>
@n2ygk n2ygk merged commit 155bef3 into jazzband:master Jun 3, 2022
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.0.0: Client Secret Hasher Migration vs. Swapped Application Models
3 participants