Commit graph

64 commits

Author SHA1 Message Date
Sangho Na aa36f481e1
chore: Add additional log messages to directauth() (#7716)
* chore: Add additional log messages to directauth()

* chore: Keep single log message for each successful response
2024-07-21 11:15:33 -07:00
Jennifer Richards 35ab9bf4e4
refactor: adjust mail ingestion api (#7523) 2024-06-15 14:18:01 -05:00
Ryan Cross 99b852805b
fix: handle registration is_nomcom_volunteer = false correctly (#7484)
Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2024-05-31 10:14:52 -05:00
Jennifer Richards 0616b07d2d
feat: email ingestion API (#7342)
* feat: IANA review email ingestor API

* refactor: Replace iana email api with generic one

* chore: Add type hint

* feat: Ingest ipr responses

* feat: Ingest nomcom feedback

* refactor: message -> msg

* fix: Typo

* feat: Send email on nomcom ingestion failure

* feat: Send email on IPR mail ingestion error

* feat: Check content type, handle more errs

* fix: drop additionalProperties: false

Unfortunately this does not mix well with
the conditional "year" property.

* test: Test ingest_email view

* Revert "test: Test ingest_email view"

This reverts commit e498022829f834a0d3cebcb0dafb0d5f5a5d162e.

* test: Test ingest_email view

* fix: pass new test

* test: Test ingest_review_email

* fix: Pass new test

* test: Test ipr ingest_response_email

* fix: pass new test

* test: test nomcom ingest_feedback_email

* chore: fix typo found in code reviw

* fix: De-lint
2024-04-23 09:07:50 -05:00
Jennifer Richards 279fb8565a
fix: Split up API tokens (#7294) 2024-04-05 14:03:04 -05:00
Jennifer Richards 6b4a806e42
feat: API to list role-holder addresses (#7291)
* feat: API to list role-holder addresses

* test: Test new API endpoint

* fix: role_holder_addresses gets own API token

* refactor: Move role_holder_addresses to ietf.api.views

* test: test for group.utils.role_holder_emails

* test: Clean up test_role_holder_addresses

* fix: Missed a change in urls.py

* refactor: Remove old view

* chore: Remove unused import

* chore: Remove unused import
2024-04-05 14:02:40 -05:00
Jennifer Richards 89d2a0c012
feat: API to retrieve active email addrs (#7035)
* feat: API to retrieve active email addrs

* test: Test active_email_list view

* chore: Remove debug statement

* fix: Return 405 on non-GET requests
2024-02-20 16:38:36 -06:00
Jennifer Richards fa56223939
feat: API to replace email alias generation commands (#7012)
* feat: DraftAliasGenerator class

Encapsulates logic from generate_draft_aliases.py

* refactor: Avoid circular imports

* feat: Add draft_aliases API endpoint

* feat: Add @requires_api_token decorator

Stolen from feat/rpc-api

* feat: Add token auth to draft_aliases endpoint

* feat: draft-aliases-from-json.py script

Parses output from the draft_aliases API call

* chore: Remove unused cruft

* refactor: Avoid shadowing "draft" name

* fix: Suppress empty lists from DraftAliasGenerator

* refactor: Use a GET instead of POST

* feat: GroupAliasGenerator class

* feat: group aliases API view

* fix: Handle domains array correctly

* fix: Suppress empty group aliases

* refactor: Generalize aliases-from-json.py script

* refactor: Same output fmt for draft and group alias apis

* feat: Sort addresses for stability

* fix: Add "anything" virtual alias

* test: Test requires_api_token decorator

* feat: Harden is_valid_token against misconfig

* test: Test is_valid_token

* test: Test draft_aliases view

* test: Test group_aliases view

* test: Test DraftAliasGenerator

* fix: ise group is type "ise" in test data

* test: Fix logic in testManagementCommand

The test was incorrect - and fails when fixed. :-(

* test: Test GroupAliasGenerator

Test currently fails

* fix: Suppress empty -ads alias

* test: Fix group acronym copy/paste error

I *think* this must be what had been intended. The
code does not look like it ever dealt with GroupHistory,
so I'm pretty sure it wasn't meant to have the same
acronym used by two different Groups at different
times.

* test: Check draft .notify alias generation

* test: Cover get_draft_notify_emails()
2024-02-07 10:15:50 -06:00
Robert Sparks d9cc26be96
feat: replace references to User with references to Person (#6024)
* refactor: change references from User to Person (#5821)

* refactor: Change CommunityList reference from User to Person

* refactor: Convert more user references to person

* refactor: Change augment_docs_and_user_with_user_info to person

* refactor: Change Nomination and Feedback references from User to Person

* refactor: Change a few test case function signatures to be more pythonic

* refactor: Harmonize how profile and photo views look up email_or_name

* refactor: Rework community views to operate on Person instead of User (#5859)

* test: Update tests to try all of the person's emails and aliases

* fix: Recode a test case to avoid an exception if there's Unicode in the URL

This only happens using the form-filling and submission feature of
WebTest, which is only used in this one test case, so just it rip out.

* test: Add duplicate-person tests

* fix: If there are multiple matching users, prefer the logged-in one.

* chore: We no longer use WebTest, so don't include it.

* fix: Address review comments

* fix: case-insensitive person name or email matching (#6096)

* chore: Renumber migrations

* fix: Update merged code so tests pass (#6887)

* fix: Use refactored method

* fix: Don't assume user has person

* fix: Use new view param name

* chore: Drop community lists w/o person; cleanup (#6896)

* fix: Don't assume user has person

* fix: user->person in update_community_list_index.py

* feat: Remove CommunityLists without Person

* refactor: Speed up nomcom migrations

---------

Co-authored-by: Paul Selkirk <paul@painless-security.com>
Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
2024-01-24 11:00:19 -06:00
Robert Sparks ca664c4162
fix: don't create a volunteer object when a person has already volunt… (#6809)
* fix: don't create a volunteer object when a person has already volunteered

* fix: safer create

* refactor: use shorthand from django

* fix: also protect volunteer from datatracker from race
2023-12-18 16:49:27 -06:00
Ryan Cross e9d44d41f0
feat: Capture volunteers from the registration system (#6605)
* feat: Capture volunteers from the registration system. Fixes #5938

* fix: allow withdrawn field to be null

* docs: add explanatory code comments

* fix: identify current nomcom by is_accepting_volunteers

* fix: use auto_now_add instead of auto_now

* fix: update migration

---------

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2023-12-14 13:46:27 -06:00
Kesara Rathnayake bcca519d67
fix: Fix document not found bug in rfcdiff API (#6681)
Fixes #6675
2023-11-22 08:37:45 -06:00
Robert Sparks 5bbea70cb0
fix: repair many revision related issues with the main and htmlized views 2023-09-12 08:55:38 -05:00
Robert Sparks f9c9644263
chore: merge main and fix conflicts 2023-08-30 16:35:20 -05:00
Robert Sparks 90ca856afa
chore: repair damage from bulk changes 2023-08-18 13:44:05 -05:00
Robert Sparks 81734443a5
fix: continued repair of code/tests re: RelatedDocument model change 2023-07-20 09:25:14 -05:00
Robert Sparks cf3a270cd2
Merge branch 'feat/rfc' into related_no_alias 2023-07-19 17:48:22 -05:00
Robert Sparks b2ebad11d5
fix: repaired rfcdiff api endpoint 2023-07-10 12:56:06 -05:00
Jennifer Richards 8f0b459050
refactor: Replace is_rfc() tests (#5925)
* refactor: Remove is_rfc() - test type_id instead

* fix: Guard against unknown pub_date

This should not ever come up - we have a published_rfc event for
every rfc. Should investigate fixing pub_date() to always return a val.
2023-07-06 12:07:53 -03:00
Robert Sparks ad0071fd7d
chore: merge feat/rfc 2023-06-26 13:12:15 -05:00
Jennifer Richards f2c2957925
refactor: Represent RFCs as their own DocType (#5835)
* feat: Add RFC DocTypeName, StateType, and States

* refactor: Rename rfc_number() to deprecated_rfc_number()

* feat: Add rfc_number field to DocInfo

* feat: Add DocRelationshipName "became-rfc"

* chore: First-pass migration to create rfc Documents

* chore: create_rfc_documents migration depends on new names

* refactor: Rename variable

* fix: Fix revname / downcase name for "became-rfc" DocRelationshipName

* chore: Remove debugging print statements

* feat: Point rfc aliases at rfc Documents

* test: Refactor RFC factories

* refactor: Rewrite is_rfc() in terms of type_id

* test: Use RfcFactory as base for IndividualRfcFactory

* refactor: Replace calls to deprecated_rfc_number()

* refactor: Remove deprecated_rfc_number() method

* test: Import WgRfcFactory
2023-06-20 15:28:16 -03:00
Robert Sparks 769d85a6c4
chore: explore architecture change in RelatedDocument 2023-06-16 14:58:42 -05:00
Robert Sparks 88a78cf1ab
Merge remote-tracking branch 'ietf-tools/main' into feat/postgres 2023-03-20 13:46:32 -05:00
Robert Sparks 2fe4647832
feat: endpoint for imapd to authenticate against (#5295)
* feat: endpoint for imapd to authenticate against

* chore: remove unintended whitespace

* fix: be stricter in matching User
2023-03-14 12:19:21 -05:00
Robert Sparks f010766654
Merge remote-tracking branch 'ietf-tools/main' into feat/postgres 2023-02-27 12:55:47 -06:00
Kesara Rathnayake cedf6a47ab
feat: Include previous draft URL in /api/rfcdiff-latest-json (#5172) 2023-02-22 12:09:32 -06:00
Robert Sparks c38ade6e1b
feat: treat django auth username as case insensitive throughout the datatracker (#5165)
* 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
2023-02-21 10:01:03 -06:00
Kesara Rathnayake f70ce3eaab
fix: Move rfcdiff-latest-json API call from /doc to /api (#5155)
Old /doc/rfcdiff-latest-json/ URL is changed to a permanent redirect to
/api/doc/rfcdiff-latest-json/
2023-02-17 10:39:47 -06:00
Lars Eggert 220be21998
chore: Use codespell to fix typos in code. (#4797)
* 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
2022-12-07 15:10:35 -06:00
Jennifer Richards 1366b6de38
Merge branch 'feat/tzaware' into jennifer/main-to-tzaware-conflicts 2022-09-14 12:36:33 -03:00
Ryan Cross 5b6695a04c
fix: save MeetingRegistration.checkedin as boolean value (#4446) 2022-09-14 09:55:08 -05:00
Ryan Cross ad08ccad27
feat: add checkedin to api_new_meeting_registration() (#4424) 2022-09-09 08:56:13 -05:00
Robert Sparks a4ecccb061
fix: pytz manipulation of dumptime
* fix: pytz manipulation of dumptime

* fix: use pytz correctly. Add test for api/version dumpinfo time.

* fix: actually use pytz correctly
2022-09-01 12:31:06 -03:00
Robert Sparks 9c236ea2a2
chore: remove unneeded logging and code marked unreachable that has not been reached. (#4305)
* chore: remove unneeded logging and code marked unreachable that has not been reached.

* fix: remove noop save override
2022-08-04 11:25:31 -05:00
rpcross 698f031b7f
feat: separate MeetingRegistration rows for each registration type. updates the registration API (#3641)
* Registration API Update

- change MeetingRegistration.reg_type field to hold only one type
- allow multiple MeetingRegistration records per person/meeting
  (one for each reg_type)

* Fix scope claims

* Add meeting 114 to MeetingRegistration migration

* fix: update stats views for MeetingRegistration model use changes

* refactor: remove unused imports
2022-06-16 15:39:34 -05:00
Robert Sparks 8373914678
fix: complete the removal of ietf.__init__.date. (#3771)
Co-authored-by: Nicolas Giard <github@ngpixel.com>
2022-03-30 18:43:51 -03:00
Kesara Rathnayake 43513ed2f5 Adds private app authentication API for bibxml. Fixes #3480. Commit ready for merge.
- Legacy-Id: 19711
2021-11-25 04:26:30 +00:00
Kesara Rathnayake dc833aa85c Implements /api/appauth/authortools API endpoint. Fixes #3396. Commit ready for merge.
- Legacy-Id: 19344
2021-09-06 11:42:16 +00:00
Ryan Cross 92f2d02207 Fix /api/v2/person/person to work with Robot apikey. Commit ready for merge.
- Legacy-Id: 19101
2021-06-09 18:13:17 +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 ca79c61950 Added a 'dumptime' entry to the JSON return from /api/version, in order to be able to make sure that running 'test-crawl --diff' will use database data from the same dump to avoid false page diff positives. Commit ready for merge.
- Legacy-Id: 18752
2020-12-11 17:08:53 +00:00
Henrik Levkowetz 6cd3e6c83e Added Person.personextresource_set to the information returned in the personal-information JSON blob.
- Legacy-Id: 18543
2020-10-02 12:10:33 +00:00
Henrik Levkowetz ac31ea1f5d Added a datatracker version endpoint /api/version. Fixes issue #3077.
- Legacy-Id: 18486
2020-09-11 14:11:37 +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 b332233d6f Fixed a problem with the handling of multiple registrations for the same person and meeting in api_new_meeting_registration().
- Legacy-Id: 18059
2020-06-24 20:49:13 +00:00
Henrik Levkowetz 9b672fc801 The registration system creates separate records for hackathon and session registration, but in order to provide OAuth2 registration information to for instance Meetecho we want just one consolidated record. Changed the handling of notifications from the registration system to aggregate reg_type and ticket_type information in one record.
- Legacy-Id: 18011
2020-06-17 15:44:37 +00:00
Henrik Levkowetz 8547432583 Updated the api_new_meeting_registration() endpoint to set all provided fields correctly. Fixes a bug that left some fields unset.
- Legacy-Id: 17957
2020-06-09 21:04:12 +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 b9b36dc124 Tweaked the meetecho access API fallback response to use person.plain_name instead of person.name.
- Legacy-Id: 17913
2020-06-06 20:13:54 +00:00