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

[Django Upgrade] [ENG-3947] Remove password_change view and route in admin #9985

Conversation

Johnetordoff
Copy link
Contributor

@Johnetordoff Johnetordoff commented Jul 20, 2022

Purpose

Upgrades password reset for Django 3 django-password-reset Changealog

⚠️ See if this is being used and where.

https://www.notion.so/cos/10-Django-Reset-Password-Update-View-e34bbfb074d244aba6d12e4a5941c1e2

⚠️ Based on Lozenge's comment I removed the views.

Changes

  • updates requirements.txt and use different import path for urls.

QA Notes

Please make verification statements inspired by your code and what your code touches.

  • Verify
  • Verify

What are the areas of risk?

Any concerns/considerations/questions that development raised?

Documentation

Side Effects

Ticket

@Johnetordoff Johnetordoff changed the base branch from develop to feature/django_upgrade July 20, 2022 14:06
@Johnetordoff Johnetordoff marked this pull request as ready for review July 20, 2022 14:06
@Johnetordoff Johnetordoff changed the title Upgrade password reset Upgrade password reset for Django 3 Jul 21, 2022
@cslzchen cslzchen force-pushed the feature/django_upgrade branch from 65b0360 to 250b832 Compare July 27, 2022 19:20
Copy link
Collaborator

@cslzchen cslzchen left a comment

Choose a reason for hiding this comment

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

Update: After our discussion I took another look and tried to test it locally. I think we can safely remove these two routes since they are not used / enabled / working at all. This is not the user facing password reset (either via email link or in user settings) but the admin app.

@Johnetordoff Johnetordoff mentioned this pull request Aug 4, 2022
14 tasks
@Johnetordoff Johnetordoff force-pushed the upgrade-password-reset branch from 55b1d8f to d232133 Compare August 4, 2022 21:22
Copy link
Collaborator

@cslzchen cslzchen left a comment

Choose a reason for hiding this comment

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

LGTM 🎆

@cslzchen cslzchen changed the title Upgrade password reset for Django 3 [Django Upgrade] Remove password reset/done view in admin Aug 5, 2022
@cslzchen cslzchen changed the title [Django Upgrade] Remove password reset/done view in admin [Django Upgrade] [ENG-3947] Remove password reset/done view in admin Aug 10, 2022
@cslzchen cslzchen force-pushed the upgrade-password-reset branch from d232133 to a6a3b44 Compare August 11, 2022 03:37
@cslzchen
Copy link
Collaborator

Rebased and removed all duplicate commits and will merge after checks pass.

@cslzchen cslzchen changed the title [Django Upgrade] [ENG-3947] Remove password reset/done view in admin [Django Upgrade] [ENG-3947] Remove password_change view and route in admin Aug 11, 2022
@cslzchen cslzchen merged commit 205e560 into CenterForOpenScience:feature/django_upgrade Aug 11, 2022
Johnetordoff pushed a commit to Johnetordoff/osf.io that referenced this pull request Aug 11, 2022
…OpenScience/osf.io into django-3

* 'feature/django_upgrade' of https://github.com/CenterForOpenScience/osf.io:
  Move file metadata population to unit test fixtures (CenterForOpenScience#9994)
  Update postgres backend and remove failover router for Django 3 (CenterForOpenScience#10011)
  Update import paths and fix deprecated modules for Django 3 (CenterForOpenScience#9983)
  Remove unused password change view/route (CenterForOpenScience#9985)

# Conflicts:
#	admin/common_auth/urls.py
#	api_tests/files/views/test_file_metadata_record_download.py
#	api_tests/schemas/views/test_file_metadata_schema_detail.py
#	osf/migrations/0136_add_datacite_file_metadata_schema.py
#	osf/migrations/0137_add_fm_record_to_osfstorage_files.py
#	osf/migrations/__init__.py
Johnetordoff pushed a commit to Johnetordoff/osf.io that referenced this pull request Aug 11, 2022
…OpenScience/osf.io into django-3

* 'feature/django_upgrade' of https://github.com/CenterForOpenScience/osf.io:
  Move file metadata population to unit test fixtures (CenterForOpenScience#9994)
  Update postgres backend and remove failover router for Django 3 (CenterForOpenScience#10011)
  Update import paths and fix deprecated modules for Django 3 (CenterForOpenScience#9983)
  Remove unused password change view/route (CenterForOpenScience#9985)

# Conflicts:
#	admin/common_auth/urls.py
#	api_tests/files/views/test_file_metadata_record_download.py
#	api_tests/schemas/views/test_file_metadata_schema_detail.py
#	osf/migrations/0136_add_datacite_file_metadata_schema.py
#	osf/migrations/0137_add_fm_record_to_osfstorage_files.py
#	osf/migrations/__init__.py
Johnetordoff pushed a commit to Johnetordoff/osf.io that referenced this pull request Aug 11, 2022
…OpenScience/osf.io into django-3

* 'feature/django_upgrade' of https://github.com/CenterForOpenScience/osf.io:
  Move file metadata population to unit test fixtures (CenterForOpenScience#9994)
  Update postgres backend and remove failover router for Django 3 (CenterForOpenScience#10011)
  Update import paths and fix deprecated modules for Django 3 (CenterForOpenScience#9983)
  Remove unused password change view/route (CenterForOpenScience#9985)

# Conflicts:
#	admin/common_auth/urls.py
#	api_tests/files/views/test_file_metadata_record_download.py
#	api_tests/schemas/views/test_file_metadata_schema_detail.py
#	osf/migrations/0136_add_datacite_file_metadata_schema.py
#	osf/migrations/0137_add_fm_record_to_osfstorage_files.py
#	osf/migrations/__init__.py
Johnetordoff pushed a commit to Johnetordoff/osf.io that referenced this pull request Aug 11, 2022
…OpenScience/osf.io into django-3

* 'feature/django_upgrade' of https://github.com/CenterForOpenScience/osf.io:
  Move file metadata population to unit test fixtures (CenterForOpenScience#9994)
  Update postgres backend and remove failover router for Django 3 (CenterForOpenScience#10011)
  Update import paths and fix deprecated modules for Django 3 (CenterForOpenScience#9983)
  Remove unused password change view/route (CenterForOpenScience#9985)

# Conflicts:
#	admin/common_auth/urls.py
#	api_tests/files/views/test_file_metadata_record_download.py
#	api_tests/schemas/views/test_file_metadata_schema_detail.py
#	osf/migrations/0136_add_datacite_file_metadata_schema.py
#	osf/migrations/0137_add_fm_record_to_osfstorage_files.py
#	osf/migrations/__init__.py
@cslzchen
Copy link
Collaborator

Fyi @Johnetordoff and @jwalz, I added an extra commit to remove password_reset from installed apps to the feature branch directly which fixes a staging3 build failure

ModuleNotFoundError: No module named 'password_reset'

@Johnetordoff
Copy link
Contributor Author

Johnetordoff commented Aug 11, 2022

Strange that didn't effect unit tests, the staging3 local.py overrides that setting, maybe it's out of date.

Edit: oh I see it's the admin app

Johnetordoff pushed a commit to Johnetordoff/osf.io that referenced this pull request Aug 11, 2022
…OpenScience/osf.io into remove-django-debug-toolbar

* 'feature/django_upgrade' of https://github.com/CenterForOpenScience/osf.io:
  Remove password_reset from installed apps
  Move file metadata population to unit test fixtures (CenterForOpenScience#9994)
  Update postgres backend and remove failover router for Django 3 (CenterForOpenScience#10011)
  Update import paths and fix deprecated modules for Django 3 (CenterForOpenScience#9983)
  Remove unused password change view/route (CenterForOpenScience#9985)
cslzchen pushed a commit that referenced this pull request Sep 1, 2022
cslzchen pushed a commit that referenced this pull request Sep 22, 2022
cslzchen pushed a commit that referenced this pull request Oct 20, 2022
mfraezz pushed a commit that referenced this pull request Oct 21, 2022
PRs:
* remove post-migrate signals from migration stream (#9964)
* move createcachetable to post migrate signal (#9944)
* [ENG-3836] Investigate waffle flags (#9950)
* [ENG-3865] Create Licenses using post-migrate signal (#9961)
* [ENG-3863] Move schema ensuring and schema blocks update to post-migrate signals (#9974)
* [ENG-3868] Move blocked email domains to post-migrate signal (#9958)
* [ENG-3866] Move citation style population out of migration stream (#9966)
* [ENG-3867] Create Storage Regions on post migration signal (#9965)
* [ENG-3836] Follow-up: Add PyYAML to Requirements (#9993)
* [ENG-3862] Move post-migrate signal out of migration stream for default providers (#9971)
* Remove unused password change view/route (#9985)
* Update import paths and fix deprecated modules for Django 3 (#9983)
* Update postgres backend and remove failover router for Django 3 (#10011)
* Move file metadata population to unit test fixtures (#9994)
* [Django Upgrade] Fix one sub-query slicing issue (#10012)
* [Django Upgrade] Upgrade django-elasticsearch-metrics (#10021)
* [Django Upgrade] Replace M2M direct assignment  (#10010)
* [Django Upgrade] Upgrade markdown and mdx_del_ins (#9984)
* [Django Upgrade] Move schema activeness/visibility update to pytest fixtures (#10029)

Commits:
* Remove osf migrations
* Remove addon migrations
* Init migrations - osf
* Init migrations - addons
* Fix migration for NotableEmailDomain
* Fix circular import with built-in admin migrations
* Add a RunSQL migration to update indexes
* Upgrade django to 3.2.15 (and related dependencies)
* Make fields defined on typedmodels subclasses nullable
* Add required on_delete=CASCADE (default) to FKs missing it
* Fix django CORS whitelist settings due to origin definition update
* Add/Enable missing templates and middlewares in api settings
* Comment out admin permissions that clash with built-in "view" ones
* Add migrations for django upgrade base fixes
* Fix system check warnings for django admin
* Fix django cache table creation
* Enable django.contrib.sessions.middleware.SessionMiddleware
* Use default truthy and falsy values from upgraded DRF 3.13.1
* Use JsonField from django.db.models and django.forms
* Fix session cookie encoding/decoding by using ensure_str()
* Use prefetch instead of Django include
* Fix CORS for ORIGINS_WHITELIST
* Rename auto generated migration for django3 upgrade fixes
* Remove QuickFile check from get_serializer_class for FileDetail view
* Add registration_schema to DraftRegistrationDetailSerializer
* Add id to DraftRegistrationDetailSerializer
* Fix middleware order and replace deprecated staticfiles with static
* Fix and rework from_db_value & to_python for EncryptedJSONField
* Fix admin login failure for django upgrade
* Wrap generated keen_read_key with ensure_str
* Clear cached storage region property when creating a new version
* Do not notify in set_password() when creating a test user
* Fix RegistrationFactory for django3 upgrade
* Remove unused update_version_metadata in file node and update tests
* Remove tests for django-include
* Remove EGAP backfill command and tests
* Set DEFAULT_AUTO_FIELD to django.db.models.AutoField (default value)
* Replace deprecated NullBooleanField + add migrations
* Replace deprecated url() with re_path() for api
* Replace deprecated url() with re_path() for admin
* Fix missing or insufficient permission test for admin preprints view
* Fix admin user view tests by using HTTP response headers object
* Fix duplicate view_node permissions in node and instn view tests
* Rework refresh_from_db() to reload GFKs
* Fix visible contributor query
* Fix handle_archive_fail and its tests
* Use a different schema to fix tests failure due to django3 upgrade
* Update URLs for URL Validation tests with Django 3
* Improve to_internal_value() in NodeRelationshipField
* Add alt fixtures to prevent both siblings & parent/child conflicts
* Fix linked_by_nodes in node related counts test
* Fix bugged NullBooleanField -> BooleanField migration
* Re-make migrations for django3 upgrade and merge them into one

Co-authored-by: Longze Chen <[email protected]>
Co-authored-by: John Tordoff <[email protected]>
Co-authored-by: Jon Walz <[email protected]>
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