Commit graph

331 commits

Author SHA1 Message Date
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
Henrik Levkowetz 2956d51ee9 Updated coverage data and tweaked an OpenIDtest and scope description.
- Legacy-Id: 18485
2020-09-11 10:48:44 +00:00
Henrik Levkowetz e6f6f4697a OpenID already has a photo URL as part of the 'profile' scope. Added the the datatracker photo url to the returned OpenID 'profile' scope information when a profile photo is available.
- Legacy-Id: 18484
2020-09-10 21:45:21 +00:00
Henrik Levkowetz 57938b039d Converted many cases of plain-text 403 messages to use a properly styled page instead, with a login link when appropriate. Also changed some API endpoint 400 responses to a more correct 403.
- Legacy-Id: 18339
2020-08-06 10:59:52 +00:00
Henrik Levkowetz e4bc508abc Merged in [18298] from rjsparks@nostrum.com:
Convert IRTF area groups into their own group type rather than attempting to overload AG. Fixes #3027.
 - Legacy-Id: 18320
Note: SVN reference [18298] has been migrated to Git commit 2b10465aa7
2020-07-30 14:27:17 +00:00
Henrik Levkowetz 8ac37a3f51 Added some normalisation of the reg_type and ticket_type entries in the OIDC registration scope.
- Legacy-Id: 18301
2020-07-28 21:04:28 +00:00
Robert Sparks 2b10465aa7 Convert IRTF area groups into their own group type rather than attempting to overload AG. Fixes #3027. Commit ready for merge.
- Legacy-Id: 18298
2020-07-28 18:54:44 +00:00
Henrik Levkowetz ae6513f1c9 Improved the handling in the OpenID Connect userinfo response of multiple meeting registrations with different email addresses for the same person.
- Legacy-Id: 18286
2020-07-28 14:01:20 +00:00
Henrik Levkowetz 606cedd796 Merged in the ExtResource work from rjsparks@nostrum.com, based on a feature request and contributions from rsalz@akamai.com. This provides external resource models for Person, Group, and Document models, as a generalisation of the previous related-URL concept. This provides a consistent labelling and classification of URLs and other resources related to a Group, Document, or Person. The GroupURL (and similar) classes will be removed in a later step. Some DocumentURL instances (such as auth48 URLs) remain to convert, as they have come in with other merged-in work while the ExtResource work was in transit.
- Legacy-Id: 18192
2020-07-20 01:58:26 +00:00
Henrik Levkowetz d8b11c4293 Removed an unused and unnecessary API endpoint, now that gather.town has gotten OpenID Connect authentication working.
- Legacy-Id: 18190
2020-07-17 19:33:15 +00:00
Henrik Levkowetz 1239e91b72 Removed a duplicate management command.
- Legacy-Id: 18188
2020-07-17 15:57:23 +00:00
Robert Sparks 6227162e53 Updated mgmt command to find github repos to back up. Improved test coverage of branch changes. Branch ready for merge.
- Legacy-Id: 18163
2020-07-13 17:36:34 +00:00
Robert Sparks 99df95d542 Cleaned up created names. Improved validation during migration. Cleaned up migration output. Cleaned the last of the awp includes from secr views. Removed now unused secr templates. Build extresource urls correctly during submission and when creating group wikis.
- Legacy-Id: 18158
2020-07-13 16:03:39 +00:00
Henrik Levkowetz c6cdbf8ca8 Added a new field Person.plain as a fallback for names where plain_name() produces the wrong result. Fixes issue #3020.
- Legacy-Id: 18147
2020-07-11 20:22:23 +00:00
Robert Sparks 53f7bc3ce6 migrated forward
- Legacy-Id: 18144
2020-07-09 21:07:05 +00:00
Henrik Levkowetz 62e1a17579 Fixed an issue with openid_userinfo() for persons with no email address.
- Legacy-Id: 18105
2020-06-30 13:50:02 +00:00
Henrik Levkowetz 94d2171c22 Removed unused imports.
- Legacy-Id: 18088
2020-06-27 17:38:43 +00:00
Henrik Levkowetz cb9006eb26 Changed skip messages from test suites to use print() instead of sys.stderr.write(), to match other output from the test runner.
- Legacy-Id: 18087
2020-06-27 17:32:02 +00:00
Henrik Levkowetz 8c90c53463 Added meeting registration 'affiliation' field to the OAuth2 'registration' scope, so that Meetecho will have the information needed build bluesheets.
- Legacy-Id: 18070
2020-06-26 19:26:28 +00:00
Henrik Levkowetz dc5ca4eebc Merged in Django 2.1 upgrade changes.
- Legacy-Id: 18060
2020-06-24 20:51:00 +00:00
Henrik Levkowetz 7c7c5da39f Changed the 2.1 removed django.contrib.auth.views.logout to LogoutView.
- Legacy-Id: 18052
2020-06-24 20:36:46 +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 e493377a52 Fixed a problem with the code to update missing person record association in a meeting registration record.
- Legacy-Id: 18044
2020-06-24 11:03:49 +00:00
Henrik Levkowetz a6a99a449f Removed a debug statement
- Legacy-Id: 18009
2020-06-17 14:56:26 +00:00
Henrik Levkowetz b0b9bb4ce9 Added code in the OpenID registration scope to look for registration matches also by email, to handle the case where somebody registered with a new email and only added it to the datatracker later. In this case, we would not have connected up the registration and the person record when first notified.
- Legacy-Id: 18008
2020-06-17 13:31:55 +00:00
Henrik Levkowetz b03b2e2477 Tweaked the OpenID Connect 'profile' grant description.
- Legacy-Id: 17980
2020-06-13 21:29:37 +00:00
Henrik Levkowetz 1cc9712ddf Changed the OpenID profile data description to match what the datatracker actually shares.
- Legacy-Id: 17975
2020-06-12 16:17:06 +00:00
Henrik Levkowetz eeba4ea992 Removed an unnecessary entry from the OIDC auth request arguments in test_oidc_code_auth().
- Legacy-Id: 17972
2020-06-12 14:39:54 +00:00
Henrik Levkowetz 61f01721c6 Added some code to set the meeting attendance flag when Meetecho pulls OAuth2 profile data for session participation between the start and end dates for a meeting.
- Legacy-Id: 17956
2020-06-09 21:01:49 +00:00
Henrik Levkowetz 3e008518c9 With ticket_type and reg_type fields now part of MeetingRegistratoin, removed the conditional handling of these attributes in the OpenID 'registration' scope handler.
- Legacy-Id: 17949
2020-06-09 14:00:47 +00:00
Henrik Levkowetz ec5d159b4f Added a new API endpoint to be used by the registration system, to trigger account creation.
- Legacy-Id: 17941
2020-06-08 19:51:10 +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
Henrik Levkowetz 275e48681d Updated the email template that goes out for password setting on account creation, to give directions also for the case when the user already has a pre-existing account. Updated a test to match.
- Legacy-Id: 17939
2020-06-08 19:48:05 +00:00
Henrik Levkowetz 65c919b325 Added OpenID support through django-oidc-provider, with tests using the certified python oic module.
- Legacy-Id: 17919
2020-06-06 21:01:21 +00:00
Henrik Levkowetz 4139d17308 Added a factory function OidClientRecordFactory for OpenID testing
- Legacy-Id: 17914
2020-06-06 20:15:18 +00:00
Robert Sparks b7f45dba05 added ways to see and edit PersonExtResources.
- Legacy-Id: 17869
2020-05-21 20:10:04 +00:00
Jim Fenton c9bc6b43f0 Give IRSG at-large members balloting capability. Fixes #2979. Branch ready for merge.
- Legacy-Id: 17838
2020-05-19 16:34:24 +00:00
Henrik Levkowetz bc05e7a8d0 Refactored many instances of msg.get_payload(decode=True).decode('utf-8') and similar to get_payload_text(msg), which uses msg.get_charset() to get the actual charset to do the decoding, in a consistent manner. Also removed some instances of force_str, but more remain.
- Legacy-Id: 17807
2020-05-16 20:20:05 +00:00
Robert Sparks fb8e5c6842 Allow IAB programs to use normal meeting mechanics. Fixes #2970. Commit ready for merge.
- Legacy-Id: 17764
2020-05-08 21:11:25 +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 566971a6ae Removed further six usage.
- Legacy-Id: 17386
2020-03-05 15:10:33 +00:00
Peter E. Yee bb7e504d14 12/13 merged into 6.113.1.dev0 with migration ordering failure
- Legacy-Id: 17149
2019-12-13 19:53:45 +00:00
Henrik Levkowetz b7724c43d7 Changed some # type: ignore statements to work with the latest mypy
- Legacy-Id: 16968
2019-11-05 22:41:18 +00:00
Henrik Levkowetz 77abc3868e Type checking tweaks.
- Legacy-Id: 16867
2019-10-15 16:54:33 +00:00
Henrik Levkowetz 33e8733b91 Fixed up mypy issues or added type:ignore comments as needed for a clean mypy run.
- Legacy-Id: 16772
2019-09-30 15:42:18 +00:00
Henrik Levkowetz 8adae6176d Improved a check for authenticated user.
- Legacy-Id: 16521
2019-07-18 19:30:01 +00:00
Henrik Levkowetz 8c6eb3a30a Python2/3 compatibility: Changed the use of open() and StringIO to io.open() etc.
- Legacy-Id: 16458
2019-07-15 19:14:04 +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 2d7c9629aa Added 'from __future__' imports all over the place, to bring code behaviour into closer alignment between python2 and python3
- Legacy-Id: 16446
2019-07-15 15:40:51 +00:00
Henrik Levkowetz f8d4c3c9a6 More assertContains() and BytesIO() related changes.
- Legacy-Id: 16411
2019-07-07 12:45:57 +00:00
Henrik Levkowetz 0679eaa8d4 Removed unused imports.
- Legacy-Id: 16402
2019-07-04 21:06:57 +00:00
Henrik Levkowetz f480799af9 Undid unintentional bulk commit
- Legacy-Id: 16401
2019-07-04 21:04:46 +00:00
Henrik Levkowetz fc09a59950 Added decode() of command pipe output.
- Legacy-Id: 16400
2019-07-04 21:01:39 +00:00
Henrik Levkowetz 97a555936d Changed a large number of test assertions to use assertContains() and removed separate, now unnecessary,status_code checks. Also changed many assertTrue(... in ...) to use assertIn().
- Legacy-Id: 16346
2019-06-30 21:03:34 +00:00
Henrik Levkowetz 36cac48063 Fixed a bunch of str/bytes issues.
- Legacy-Id: 16341
2019-06-30 20:54:09 +00:00
Henrik Levkowetz 15e74e89cb Converted instances of assertTrue(text in response.content) to the recommended assertContains(response, text), and similar for assertFalse(... in ...)
- Legacy-Id: 16336
2019-06-29 13:43:31 +00:00
Henrik Levkowetz 3ec7e864be Converted leading tabs to spaces in ietf/**/*.py
- Legacy-Id: 16310
2019-06-27 14:51:02 +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 db12f2b948 Fixed some name versus pk issues lingering after the Document/DocAlias primary key refactoring. Fixes issue #2729.
- Legacy-Id: 16288
2019-06-19 12:57:52 +00:00
Henrik Levkowetz 426870b766 Merged in the Document and DocAlias primary key change and m2m work in ^/personal/henrik/6.96.1-docalias.
- Legacy-Id: 16261
2019-06-15 12:00:48 +00:00
Henrik Levkowetz 815602351f This is a series of 50 migrations that changes the Document and DocAlias
primary keys from character strings to integers, and makes corresponding code
changes.

This was prompted by database limitations discovered when trying to make
DocAlias use a m2m document field; with 255 long strings as primary keys for
Document and DocAlias this violated the MySQL database limitations.

Changing the primary keys to integers should also improve efficiency.  

Due to the data migrations which create the new integer primary keys and adds
corresponding integer foreign keys matching the previous string foreign keys
in all tables having foreign keys to Document and DocAlias, some of these
migrations take a long time.  The total set of migrations are expected to have
a runtime on the order of 2 hours.
 - Legacy-Id: 16237
2019-06-10 11:32:46 +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 b57ad67041 Updated code and templates to use the new docman and groupman group features.
- Legacy-Id: 15922
2019-01-30 15:59:00 +00:00
Henrik Levkowetz 57a4c9f41f Added 9 new group features, and changed list-like char fields to json fields, to get better support for using the values as lists. Modified code to use the group features instead of explicit lists of group types in many places in the code.
- Legacy-Id: 15908
2019-01-22 18:11:46 +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 3756923f40 Added username validation to the change username form, to avoid database key collision exceptions. Instead give a message to contact the secretariat to resolve the situation.
- Legacy-Id: 15490
2018-09-27 12:52:40 +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
Robert Sparks 02e85340f6 use factories for ietf.ietfauth.tests. Commit ready for merge
- Legacy-Id: 15399
2018-07-19 18:30:49 +00:00
Henrik Levkowetz 5251d0eb78 Changed the handling of the consent field of /account/profile/ to only be required set when information requiring consent is present.
- Legacy-Id: 15261
2018-06-14 19:28:06 +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 eaff1f0825 Fixed a bug in a form clean method.
- Legacy-Id: 15210
2018-06-04 15:31:37 +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 f6537fda59 Added a dagger at the end of some fields in the account data forms to signify consent-based fields, and made the consent field required.
- Legacy-Id: 15174
2018-05-26 08:36:06 +00:00
Henrik Levkowetz 2522082979 Changed the email origin field during test to hold user.username in order to exercise more of the code. Changed the EmailFactory to also use user.username as origin.
- Legacy-Id: 15172
2018-05-26 08:32:20 +00:00
Henrik Levkowetz 70ed611472 Changed the field type for the Person.consent field.
- Legacy-Id: 15146
2018-05-17 16:45:21 +00:00
Henrik Levkowetz 246c348f1e Disallow profile changes without consent given. Together with previous commits this fixes issues #2505 and #2507.
- Legacy-Id: 15143
2018-05-08 16:26:01 +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 53c4ac36db Removed the Person.address field, which is not being used. This was a legacy from the 2001 perl-based datatracker tables. Fixes issue #2504.
- Legacy-Id: 15095
2018-04-27 14:00:33 +00:00
Henrik Levkowetz 496da66fc1 Added a new role 'Recording Manager'.
- Legacy-Id: 14964
2018-03-29 10:58:04 +00:00
Henrik Levkowetz ad2139dc8f Fixed a settings typo.
- Legacy-Id: 14725
2018-03-03 18:30:19 +00:00
Robert Sparks 13e8f8982c Add the ability to add a comment to a group's history. Fixes #1483. Commit ready for merge.
- Legacy-Id: 14468
2017-12-28 20:48:58 +00:00
Henrik Levkowetz a08c8dc76f Added an API endpoint to support automation of IESG ballot position posting, at /api/iesg/position. Added tests for the API endpoint, and updated the apikey validation decorator tests. Tweaked the decorator to handle a weakness found during testing.
- Legacy-Id: 14429
2017-12-17 21:55:27 +00:00
Henrik Levkowetz ec4e238185 Added some missing files.
- Legacy-Id: 14427
2017-12-16 18:39:26 +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
Henrik Levkowetz 3a47fd79c8 Don't blow up when checking if the logged-in user is a document author, if the user don't have a person record.
- Legacy-Id: 14221
2017-10-18 12:32:26 +00:00