Commit graph

101 commits

Author SHA1 Message Date
Jennifer Richards 32054111df
fix: fix failing tests and eliminate naive datetime warnings (#4402)
* test: fix timestamp construction in several doc tests

* refactor: rename date2datetime to datetime_from_date and clarify code

* chore: helper to get tzinfo for PRODUCTION_TIMEZONE

* fix: fix timezone handling in make_last_call()

* test: fix datetime generation in doc.tests_charter

* refactor: remove PRODUCTION_TIMEZONE setting

Replaces the PRODUCTION_TIMEZONE setting with a constant,
DEADLINE_TZINFO, in ietf.utils.timezone.

* test: be more careful about timezone in tests_charter.py

* test: be more careful about timezone in doc/tests.py

* fix: fix timezone handling affecting doc.tests_draft

* fix: fix timezone handling affecting tests_irsg_ballot.py

* fix: fix timezone handling affecting tests_review.py

* fix: fix timezone handling affecting last ietf.doc tests

* fix: fix timezone handling affecting last ietf.group tests

* fix: fix timezone handling affecting ietf.iesg tests

* fix: handle timezones in get_8989_eligibility_querysets

* fix: handle timezones affecting ietfauth tests

* fix: return tz-aware datetime from utc_from_string

* fix: specify timezone for constants in ipr_rfc_number()

* fix: specify tz for ipr deadlines

* fix: handle timezones affecting liaisons tests

* fix: treat leap day in get_8989_eligibility_querysets()

Manual cherry-pick of 248d6474

* test: treat leap day properly in nomcom tests

* fix: fix timezone handling affecting nomcom tests

* test: fix timezone handling in review tests

* fix: fix timezone handling affecting secr.meetings tests

* fix: handle both pytz and zoneinfo timezones in ietf.utils.timezone

* fix: fix timezone handling affecting secr.proceedings tests

* refactor: use make_aware() helper in secr.meetings tests

* test: fix timezone handling in secr.telechat tests

* fix: fix timezone handling affecting stats tests

* fix: eliminate tz-naive helpers affecting sync email parsing

* fix: include timezone data when serializing DeletedEvent data

* fix: fix timezone handling affecting sync tests

* style: remove unused import
2022-09-01 13:07:28 -03:00
Jennifer Richards 067ae17b4e
fix: do not set user template var in ietfauth views (#4216)
Lets the `user` variable pick up `request.user`.
Fixes #3568
2022-07-15 13:37:25 -05:00
Lars Eggert c09fd9dad2
chore: Use URL resolver in more places (#4104)
* chore: Use URL resolver more

* Use settings.IDTRACKER_BASE_URL

* More fixes

* Use URL resolver for things under /accounts

* Use URL resolver for things under /stream

* Use URL resolver for things under /iesg

* Use URL resolver for things under /meeting

* Fix bugs

* Use URL resolver for things under /help

* Use URL resolver for things under /ipr

* More changes

* Revert vnu.jar

* Fix typos

* Address review comments by @rjsparks

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2022-06-22 14:10:16 -05:00
Robert Sparks 8b90ecd4aa
feat: add pronouns to Person and oidc claims. Fixes #4043. (#4059)
* feat: add pronouns

* fix: include migrations

* fix: correct daggers on person form.

* fix: clean pronouns

* feat: add choices to pronouns

* feat: show pronouns on public profile

* feat: add pronouns to oidc userinfo

* fix: move pronouns to new claim. Add tests.

* fix: improve html generated by new widget

* feat: use a MultiWidget for pronouns

* refactor: use two fields on Person for the two types of pronoun entry.

* chore: update copyrights
2022-06-21 15:02:02 -05:00
Lars Eggert 3234f1a121
test: Validate HTML rendered during tests (#3782) 2022-04-07 13:30:38 -03:00
Jennifer Richards 686a9150b3 Merge remote-tracking branch 'origin/main' into personal/jennifer/7.45.1.dev0.bootstrap-merge
# Conflicts:
#	ietf/templates/meeting/session_buttons_include.html
2022-03-04 15:14:52 -04:00
Robert Sparks e3aa43eea5 Merged in [19967] from rjsparks@nostrum.com:
From Kesara Rathnayake: Expire password reset links on use, password change through other mechanics, login, or a short configurable time (initially one hour). Patched in at 7.45.0.p2.
 - Legacy-Id: 19968
Note: SVN reference [19967] has been migrated to Git commit 682392081bddbd1b8653df9135388e6b7c48ee1c
2022-02-23 18:30:27 +00:00
Jennifer Richards 6c260a5b7e Merge 7.45.1.dev0 into Bootstrap 5 update branch. Made a first pass at reconciling differences.
- Legacy-Id: 19945
2022-02-17 20:09:49 +00:00
Lars Eggert cc723ce449 More fixes.
- Legacy-Id: 19899
2022-01-31 19:17:50 +00:00
Robert Sparks f7a9e0a1f9 Remove the manual intervention step for account creation. Commit ready for merge.
- Legacy-Id: 19858
2022-01-19 18:10:30 +00:00
Robert Sparks 86102b9980 Allow people to volunteer for NomCom via the datatracker. Commit ready for merge.
- Legacy-Id: 19104
2021-06-10 20:35:50 +00:00
Robert Sparks 80798f8dfa Avoid duplicate choices for person api endpoints.
- Legacy-Id: 19082
2021-06-04 21:45:16 +00:00
Robert Sparks 3697180cc1 Reverted merge of timezone-aware migration efforts.
- Legacy-Id: 18792
2021-01-12 16:54:20 +00:00
Henrik Levkowetz 774e752a54 Snapshot of timezone-aware datatracker code. Tests pass, and the test-crawler shows only expected differences. Trunk changes merged in up to r18768.
- Legacy-Id: 18770
2020-12-16 23:53:37 +00:00
Henrik Levkowetz f41fd1867d Upgraded the required versions of mypy and django-stubs to the latest that support Django 2.2. Fixed some issues found by after the upgrades.
- Legacy-Id: 18717
2020-11-22 21:13:36 +00:00
Henrik Levkowetz ac5e88b82b Added a context processor to make settings generally available in page templates. Split the SECRETARIAT_TICKET_EMAIL setting into SECRETARIAT_ACTION_EMAIL and SECRETARIAT_INFO_EMAIL, with different addresses. Updated places with hardcoded ietf-action@ietf.org addresses to use the settings value, and updated some places to use ietf-infor@ietf.org instead of the ietf-action address. Fixes issue #3081.
- Legacy-Id: 18501
2020-09-17 11:10:27 +00:00
Robert Sparks bf53bf1057 Merged forward. Added some missing parts to the XMPPURLValidator.
- Legacy-Id: 18050
2020-06-24 19:01:45 +00:00
Henrik Levkowetz 2416a46f5e Refactored some account creation code to re-use the email sending part in the registration system notification api for new meeting registrations.
- Legacy-Id: 17940
2020-06-08 19:49:30 +00:00
Robert Sparks b7f45dba05 added ways to see and edit PersonExtResources.
- Legacy-Id: 17869
2020-05-21 20:10:04 +00:00
Henrik Levkowetz 69a5d0817d Refined the GUI for personal API endpoints so that endpoints for which one does not have the right Roles do not show in the GUI, and added a supporting method on Person objects. Updated tests accordingly.
- Legacy-Id: 17643
2020-04-15 17:22:06 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz 8adae6176d Improved a check for authenticated user.
- Legacy-Id: 16521
2019-07-18 19:30:01 +00:00
Henrik Levkowetz 831fb18f8a Python2/3 compatibility: Added force_str or force_bytes in some places, to ensure the argument right type
- Legacy-Id: 16450
2019-07-15 15:49:35 +00:00
Henrik Levkowetz d7f5c84182 Initial 2to3 patch with added copyright statement updates.
- Legacy-Id: 16309
2019-06-27 14:40:54 +00:00
Henrik Levkowetz 8726e74709 Merged in a refactoring of document review code from rjsparks@nostrum.com. This introduces ReviewAssignments, letting us do multiple assingments for a given RevieRequest, without conflating the assignments and their results with the request itself.
- Legacy-Id: 16177
2019-04-30 16:54:06 +00:00
Henrik Levkowetz bb4fe3fbbf Undid previous commit
- Legacy-Id: 16153
2019-04-22 19:22:42 +00:00
Henrik Levkowetz cfcefc2e32 Merged in [16144] from housley@vigilsec.com:
Remove some clutter from I-D upload page.  The information was mived to the Instructions tab, but a higligh to the Note Well and BCP 78 was added. Fixes #2057.
 - Legacy-Id: 16151
Note: SVN reference [16144] has been migrated to Git commit 37851b9742
2019-04-22 17:39:26 +00:00
Robert Sparks 6a2cf42e5c Don't allow users to edit the 'active' value for unknown-email-* addresses. Related to #2696. Commit ready for merge.
- Legacy-Id: 16106
2019-03-27 09:15:06 +00:00
Robert Sparks 0856990683 Checkpoint. Most tests do not fail. Oddness with an API resource, and with one template's coverage
- Legacy-Id: 16031
2019-03-14 18:39:40 +00:00
Henrik Levkowetz 753f34fba1 Merged in [15702] from johnl@taugh.com:
Allow email as well as username when logging in.
 - Legacy-Id: 15739
Note: SVN reference [15702] has been migrated to Git commit e4dd65d9f9
2018-11-08 06:42:32 +00:00
John R. Levine e4dd65d9f9 Allow email as well as username when logging in. Commit ready for merge.
- Legacy-Id: 15702
2018-11-03 09:35:55 +00:00
Henrik Levkowetz c305498903 Prevent issues for logins without Person records by not letting Person-less users through login.
- Legacy-Id: 15528
2018-10-07 19:35:54 +00:00
Henrik Levkowetz 9067a2da7c Fixed an issue where a user record without matching person record will cause an exception.
- Legacy-Id: 15478
2018-09-20 18:04:23 +00:00
Henrik Levkowetz a5cc83ccb4 Fixed an issue with login().
- Legacy-Id: 15474
2018-09-19 15:22:44 +00:00
Henrik Levkowetz 4fba531e9e Merged in the latest GDPR changes. This refines the handling of the consent checkbox on the account page; refines the Consent Needed warning given on login if consent is needed; tweaks several models to set the on_deletion fields for FK to User and Person appropriately; adds a Person.needs_consent() method to capture the logic of which fields require consent; refines the Person.plain_name() method and the user.log.log() function; and adds 2 management commands to send out consent requests and delete non-consent information, respectively.
- Legacy-Id: 15464
2018-09-16 23:12:43 +00:00
Henrik Levkowetz 50632482ea Improved the wording of the consent required login warnin. Refactored the login view to use Person.needs_consent() instead of inline logic.
- Legacy-Id: 15260
2018-06-14 19:27:03 +00:00
Henrik Levkowetz bf3074e493 Changed an attribute guard to work with a reverse relationship attribute (using hasattr()).
- Legacy-Id: 15251
2018-06-14 04:35:04 +00:00
Henrik Levkowetz 5f7fb2e0bd Added a guard against trying to access attributes of a None object.
- Legacy-Id: 15236
2018-06-09 13:20:14 +00:00
Henrik Levkowetz cf0061c3a0 Fixed logic of gathering which personal information needs consent confirmation in the code that requests consent on login.
- Legacy-Id: 15218
2018-06-06 15:13:34 +00:00
Henrik Levkowetz adb47d595a Fixed an issue with user.is_authenticated being used as a method rather than a property.
- Legacy-Id: 15212
2018-06-04 16:53:30 +00:00
Henrik Levkowetz ad34a88b31 Added a request to give consent for non-LI information on user login. Addresses issue #2505.
- Legacy-Id: 15211
2018-06-04 15:35:25 +00:00
Henrik Levkowetz 2fd1f81749 Added assignment of email origin in another place.
- Legacy-Id: 15175
2018-05-26 08:36:50 +00:00
Henrik Levkowetz 5f37a71889 Added origin information to all places where we create email address entries.
- Legacy-Id: 15127
2018-05-05 12:40:30 +00:00
Henrik Levkowetz e7209c6e50 Added a new personal event table to keep track of personal API key logins, and a management command to send out reports about activity to users with API keys. Added a weekly cronjob script to trigger weekly reports, and a monthly script for future use. Added a @require_api_key decorator to validate API keys for API key views and log in the API key owner. Modified the API key management urls to use create and disable rather than add and delete. Updated the API key list view. Added an API placeholder view function for ballot position setting, for test purposes. Added tests for the decorator and management command.
- Legacy-Id: 14426
2017-12-16 18:37:52 +00:00
Henrik Levkowetz 152261a869 Added new infrastructure for personal API keys, to generate, view, and delete them.
- Legacy-Id: 14423
2017-12-14 14:30:59 +00:00
Robert Sparks dc20598999 Show whether a person is nomcom eligible on their edit_profile page. Related to #2257 and #2323. Commit ready for merge.
- Legacy-Id: 14086
2017-08-28 19:28:44 +00:00
Lars Eggert 8a70e9773d Fix various "RemovedInDjango20Warning" warnings. Commit ready for merge.
- Legacy-Id: 13112
2017-03-25 19:16:45 +00:00
Henrik Levkowetz ce9f879500 Create all appropriate aliases when a Person record is created, both in ietfauth and in PersonFactory.
- Legacy-Id: 12958
2017-03-03 19:42:16 +00:00
Henrik Levkowetz a94c33fd6e Added an alert on the login form, to be shown if a user's password has been cleared. Adjusted url reverse strings to match the changed view function.
- Legacy-Id: 12918
2017-02-25 15:50:47 +00:00
Henrik Levkowetz 858d855eff Changed the new account creation to require a proper name at the same time as the account password is set, before actually creating the account. Also tweaked the password strength and confirmation code.
- Legacy-Id: 12892
2017-02-20 16:50:39 +00:00