* feat: django-rest-framework + Person/Email API (#8233)
* chore: djangorestframework -> requirements.txt
* chore: auth/perm/schema classes for drf
* chore: settings for drf and friends
* chore: comment that api/serializer.py is not DRF
* feat: URL router for DRF
* feat: simple api/v3/person/{id} endpoint
* fix: actually working demo endpoint
* chore: no auth for PersonViewSet
* ci: params in ci-run-tests.yml
* Revert "ci: params in ci-run-tests.yml"
This reverts commit 03808ddf94afe42b7382ddd3730959987389612b.
* feat: email addresses for person API
* feat: email update api (WIP)
* fix: working Email API endpoint
* chore: annotate address format in api schema
* chore: api adjustments
* feat: expose SpectacularAPIView
At least for now...
* chore: better schema_path_prefix
* feat: permissions for DRF API
* refactor: use permissions classes
* refactor: extract NewEmailForm validation for reuse
* refactor: ietfauth.validators module
* refactor: send new email conf req via helper
* feat: API call to issue new address request
* chore: move datatracker DRF api to /api/core/
* fix: unused import
* fix: lint
* test: drf URL names + API tests (#8248)
* refactor: better drf URL naming
* test: test person-detail view
* test: permissions
* test: add_email tests + stubs
* test: test email update
* test: test 404 vs 403
* fix: fix permissions
* test: test email partial update
* test: assert we have a nonexistent PK
* chore: disable DRF api for now
* chore: fix git inanity
* fix: lint
* test: disable tests of disabled code
* test: more lint
* fix: optimize can_manage_some_groups
* fix: improve cache key
* refactor: extra_role_qs to kwargs and bugfix to cache key
* fix: restrict groupman_role matches to active states
* chore: styling, decommenting, black
* fix: Send create user email for password resets where we have an email and person, but no user account
This fixes https://github.com/ietf-tools/datatracker/issues/6458
* fix: create User straight away and use nomral password reset
---------
Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
* feat: send_apikey_usage_emails_task
* chore: update test to use task instead of cmd
* chore: add PeriodicTask
* chore: remove old command + empty management dir
* chore: remove now-empty bin/weekly
* refactor: only consider keys that might have events
---------
Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
* fix: validate form in login()
* refactor: custom LoginView subclass for logins
Preserves old behavior, but avoids some hacks.
* test: reverse with strings, not view refs
* chore: remove unused imports
* fix: restore logout() call
* fix: remove synchronization with mailman2
* feat: manage non wg mailing lists explicitly
* chore: black
* fix: update tests for new nonwg view
* feat: drop unused models
* fix: Don't redirect user to the login page when logging in (#5876)
(Embrace and extend c4bf508cd8.)
* test: Add test case for login button
* refactor: The template filter just strips off a path prefix, so rename/recode accordingly
Also test with a non-trivial redirect target.
* refactor: Remove all existing migrations
* refactor: Create clean set of migrations
* chore: Skip check_statetype_slugs when DB is not yet populated
* fix: Do not cache active_groups_menu on module import
* fix: Do not patch timezone awareness out of oidc-provider
* refactor: Migrate to create postgres schema, only use pgloader for data
* ci: Use migration scripts from feat/pg-migrations branch
* Revert "ci: Use migration scripts from feat/pg-migrations branch"
This reverts commit c82f64c614241ccede4865a50d494725c8a47c15.
* ci: Run check before migrate
* fix: Remove redundant migration caused by merge error
* chore: Add casts/ALTER TABLEs to eliminate pgloader errors/warnings
* chore: Change schema name to match docker image assumptions
* chore: Clear out schema so we get a clean start in case of a retry
This change allows password reset with any email address associated with the
account.
The password reset will only be sent to the active email addresses associated
with the account.
Fixes#5057
* feat: insensitive username matching at django authentication
* feat: use iexact when using the User object manager
* fix: more places to ignore username case
* fix: remove unused management command
* fix: avoid get when probing for object existance
* fix: force lowercase new usernames in secr/rolodex
* fix: use explicit arguments when creating user
* fix: Only send password reset email to known, active addresses
Limits password reset to Users with a Person and at least one active
address on file. Avoids the possibility of sending a password reset to
a spoofed address as in CVE-2019-19844.
* test: Use factory instead of explicit construction
* test: Test that a User with no Person cannot reset password
* fix: Fix handling of User.person field when it's null
* test: Test that reset emails are sent to known, active addresses
* feat: enable editorial stream adoption and balloting
* fix: bring tests into line with refactor
* feat: force intended_std_level to Informational when adopting into a non-ietf stream.
* fix: improve blocking position labels and email content
* fix: simplify pointer to group on doc main page for rswg docs
* fix: recover from merge typos
* fix: correct defer and clear ballot behavior
* fix: improve publication request access logic
* fix: clean up broken editorial state
* fix: adjust test to match migrations
* chore: Use codespell to fix typos in code.
Second part of replacement of #4651
@rjsparks, I probably need to revert some things here, and I also
still need to add that new migration - how do I do that?
* Revert migrations
* Migrate "Whitelisted" to "Allowlisted"
* TEST_COVERAGE_MASTER_FILE -> TEST_COVERAGE_MAIN_FILE
* Fix permissions
* Add suggestions from @jennifer-richards
* fix: remove help/personal-information and the prompt-for-consent email management command.
* fix: remove gdpr treatment except for consent checkbox. Rename Submit.
* fix: drom the consent column from Person and Person.History
* fix: remove the consent boolean. Reorganize the account info form.
* chore: reorder migrations