Commit graph

96 commits

Author SHA1 Message Date
Jennifer Richards 3130ecd9f5
fix: add recording-name api key endpoint; appauth url fix (#8081)
* fix: add endpoint option for recording-name

* chore: migration

* test: validate PersonalApiKey when used in tests

* fix: limit /api/appauth URLs as intended

* test: fix tests

* chore: fix lint

* test: PersonalApiKey create -> factory

* chore: remove unused import
2024-10-25 08:52:09 -05:00
Robert Sparks 8881010051
feat: explicit names for meetecho recordings (#8062)
* feat: explicit names for meetecho recordings

* fix: better regex and kebab-styled-endpoint-name

* fix: spaces around comparison operator
2024-10-21 16:45:36 -05:00
Jennifer Richards d8d52eedbf
feat: email ingestor api test endpoint (#7915)
* feat: email ingestor api test endpoint

* ci: add ingestion test token for sandbox

* chore: fix comments
2024-09-09 10:00:54 -05:00
Matthew Holloway e5e6c9bc89
feat: Site status message (#7659)
* Status WIP

* feat: Status

* fix: Status tests

* feat: status redirect

* chore: Status tests

* chore: Status tests

* feat: Status tests

* chore: Status playwright tests

* fix: PR feedback, mostly Vue and copyright dates

* fix: Status model migration tidy up

* chore: Status - one migration

* feat: status on doc/html pages

* chore: Resetting Status migration

* chore: removing unused FieldError

* fix: Update Status test to remove 'by'

* chore: fixing API test to exclude 'status'

* chore: fixing status_page test

* feat: Site Status PR feedback. URL coverage debugging

* Adding ietf.status to Tastypie omitted apps

* feat: Site Status PR feedback

* chore: correct copyright year on newly created files

* chore: repair merge damage

* chore: repair more merge damage

* fix: reconcile the api init refactor with ignoring apps

---------

Co-authored-by: Matthew Holloway <Matthew Holloway>
Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2024-08-07 13:36:21 -05: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
Robert Sparks e6138ca126
feat: session apis (#7173)
* feat: Show bluesheets using Attended tables (#7094)

* feat: Show bluesheets using Attended tables (#6898)

* feat: Allow users to add themselves to session attendance (#6454)

* chore: Correct copyright year

* fix: Address review comments

* fix: Don't try to generate empty bluesheets

* refactor: Complete rewrite of bluesheet.html

* refactor: Fill in a few gaps, close a few holes

- Rename the live "bluesheet" to "attendance", add some explanatory text.
- Add attendance links in materials view and pre-finalized proceedings view.
- Don't allow users to add themselves after the corrections cutoff date.

* fix: Report file-save errors to caller

* fix: Address review comments

* fix: typo

* refactor: if instead of except; refactor gently

* refactor: Rearrange logic a little, add comment

* style: Black

* refactor: auto_now_add->default to allow override

* refactor: jsonschema to validate API payload

* feat: Handle new API data format

Not yet tested except that it falls back when the old
format is used.

* test: Split test into deprecated/new version

Have not yet touched the new version

* style: Black

* test: Test new add_session_attendees API

* fix: Fix bug uncovered by test

* refactor: Refactor affiliation lookup a bit

* fix: Order bluesheet by Attended.time

* refactor: Move helpers from views.py to utils.py

* test: Test that finalize calls generate_bluesheets

* test: test_bluesheet_data()

* fix: Clean up merge

* fix: Remove debug statement

* chore: comments

* refactor: Renumber migrations

---------

Co-authored-by: Paul Selkirk <paul@painless-security.com>

* chore: Remove unused import

* style: Black

* feat: Stub session update notify API

* feat: Add order & rev to slides JSON

* style: Black

* feat: Stub actual Meetecho slide deck mgmt API

* refactor: Limit reordering to type="slides"

* chore: Remove repository from meetecho API

(API changed on their end)

* feat: update Meetecho on slide reorder

* refactor: drop pytz from meetecho.py

* chore: Remove more repository refs

* refactor: Eliminate more pytz

* test: Test add_slide_deck api

* fix: Allow 202 status code / absent Content-Type

* test: Test delete_slide_deck api

* test: Test update_slide_decks api

* refactor: sessionpresentation_set -> presentations

* test: Test send_update()

* fix: Debug send_update()

* test: ajax_reorder_slides calls Meetecho API

* test: Test SldesManager.add()

* feat: Implement SlidesManager.add()

* test: Test that ajax_add_slides... calls API

* feat: Call Meetecho API when slides added to session

* test: Test SlidesManager.delete()

* feat: Implement SlidesManager.delete()

* test: ajax_remove_slides... calls Meetecho API

* feat: Call Meetecho API when slides removed

* chore: Update docstring

* feat: rudimentary debug mode for Meetecho API

* test: remove_sessionpresentation() calls Meetecho API

* feat: Call Meetecho API from remove_sessionpresentation()

* test: upload_slides() calls Meetecho API

* style: Black

* fix: Refactor/debug upload_session_slides

Avoids double-save of a SessionPresentation for the session
being updated and updates other sessions when apply_to_all
is set (previously it only created ones that did not exist,
so rev would never be updated).

* test: Fix test bug

* feat: Call Meetecho API when uploading session slides

* fix: Only replace slides actually linked to session

* fix: Delint

Removed some type checking rather than debugging it

* fix: Send get_versionless_href() as url for slides

* test: TZ-aware timestamps, please

* chore: Add comments

* feat: Call Meetecho API in edit_sessionpresentation

* feat: Call Meetecho API in remove_sessionpresentation

* feat: Call Meetecho API from add_sessionpresentation

* fix: Set order in add_sessionpresentation

* fix: Restrict API calls to "slides" docs

* feat: Call Meetecho API on title changes

* test: Check meetecho API calls in test_revise()

* fix: better Meetecho API "order" management

* fix: no PUT if there are no slides after DELETE

* feat: Catch exceptions from SlidesManager

Don't let errors in the MeetEcho slides API interfere with
the ability to modify slides for a session.

* feat: Limit which sessions we send notifications for

* fix: handle absence of request_timeout in api config

* test: always send slide notifications in tests

* fix: save slides before sending notification (#7172)

* fix: save slides before sending notification

* style: fix indentation

It's not a bug, it's a flourish!

---------

Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
Co-authored-by: Paul Selkirk <paul@painless-security.com>
2024-03-12 10:22:24 -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
Robert Sparks 8cb7f3dcae
feat: Import IESG artifacts into the datatracker (#6908)
* chore: remove unused setting

* feat: initial import of iesg minutes

* fix: let the meetings view show older iesg meetings

* feat: iesg narrative minutes

* feat: import bof coordination call minutes

* wip: import commands for iesg appeals and statements

* feat: import iesg statements.

* feat: import iesg artifacts

* feat: many fewer n+1 queries for the group meetings view

* fix: restore chain of elifs in views_doc

* fix: use self.stdout.write vs print in mgmt commands

* fix: use replace instead of astimezone when appropriate

* chore: refactor new migrations into one

* fix: transcode some old files into utf8

* fix: repair overzealous replace

* chore: black

* fix: address minro review comments

* fix: actually capture transcoding work

* fix: handle multiple iesg statements on the same day

* fix: better titles

* feat: pill badge replaced statements

* fix: consolodate source repos to one

* feat: liberal markdown for secretariat controlled content

* fix: handle (and clean) html narrative minutes

* feat: scrub harder

* fix: simplify and improve a scrubber

* chore: reorder migrations
2024-02-20 16:35:08 -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
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 e0f27b9d52
ci: merge branch 'main' into feat/rfc 2023-09-05 12:02:07 -05:00
Robert Sparks 3c1fc3c0f9
chore: use factory-boy 3.3 (#6269) 2023-09-05 09:54:30 -05:00
Robert Sparks 823281ba6c
chore: first pass at clearing out canonical_name 2023-08-18 10:59:55 -05:00
Jennifer Richards 48d4072eeb
Merge branch 'feat/rfc' into main-merge
# Conflicts:
#	ietf/doc/factories.py
#	ietf/doc/tests_status_change.py
#	ietf/name/fixtures/names.json
#	ietf/templates/doc/document_info.html
2023-08-03 18:34:06 -03:00
Liubov Kurafeeva 3a499cd068
fix: Server error from api_get_session_materials() (#6025)
Fixes #5877
2023-07-22 16:36:35 -07: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
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
Jennifer Richards 1eafdca65c
chore: Replace django.utils.timezone.utc with dateutil.timezone.utc 2023-05-19 13:23:38 -03:00
Jennifer Richards 09ff9c6ced
refactor: Tie Meetecho resources to Session pk (#5281)
* feat: Use session.id to specify session for api_set_session_video_url

* feat: Use session.id to specify session for api_upload_bluesheet

* refactor: Add audio/video stream and onsite tool URLs to Session model

* refactor: Get onsite tool/stream URLs for agenda from Session

* refactor: Use Session methods for onsite tool/stream a few more places

* refactor: Move hard-coded meetecho URLs into settings.py

* feat: Add has_onsite_flag to Session

* chore: Set has_onsite_tool for sessions that had meetecho UrlResources

* fix: Only show onsite tool URLs when Session.has_onsite_tool is True

* test: Update test_api_upload_bluesheet to test deprecated version

* fix: Fix test failure in api_upload_bluesheet view

* test: Add test of new api_upload_bluesheet view

* style: Apply Black style to test_api_upload_bluesheet

* fix: Fix test failures in api_upload_bluesheet()

* test: Update test_api_set_session_video_url to test deprecated version

* fix: Fix test failure in api_set_session_video_url view

* test: Add test of new api_set_session_video_url view

* style: Apply Black styling to new test

* fix: Fix test failures in api_set_session_video_url view

* test: Fix test_meeting_agenda; set has_onsite_tool in SessionFactory

* feat: Add has_onsite_tool to Session list in admin

* feat: Add has_onsite_tool flag to SessionDetailsForm

* feat: Add has_onsite_tool flag to sreq

* feat: Show has_onsite_tool flag on secr view for a submitted request

* feat: Only prompt for has_onsite_tool in sreq for non-wg type groups

* fix: Clean up styling of sreq view a bit

* chore: Renumber migrations
2023-04-23 18:15:01 -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
Ryan Cross b654b49d6b
refactor: Remove secr proceedings (#5256)
* refactor: remove import_audio_files() and related code

* refactor: move functions from proc_utils to meeting/utils

* refactor: remove secr/proceedings
2023-03-10 15:33:01 -06:00
Kesara Rathnayake cedf6a47ab
feat: Include previous draft URL in /api/rfcdiff-latest-json (#5172) 2023-02-22 12:09:32 -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
Jennifer Richards f3bdbf0ed4
Merge branch 'feat/tzaware' into jennifer/main-for-tzaware-merge
# Conflicts:
#	ietf/meeting/tests_js.py
#	ietf/meeting/tests_models.py
#	ietf/meeting/tests_views.py
#	ietf/meeting/views.py
#	ietf/name/fixtures/names.json
#	ietf/templates/meeting/agenda.html
#	ietf/templates/meeting/session_buttons_include.html
#	ietf/templates/meeting/timeslot_start_end.html
2022-10-14 16:35:57 -03:00
Robert Sparks 50668c97cd
feat: apis for attaching chatlogs and polls to session materials (#4488)
* feat: apis for attaching chatlogs and polls to session materials

* fix: anticipate becoming tzaware, and improve guard against attempts to provide docs for sessions that have no official timeslot assignment.

* fix: get chatlog upload to actually work

Modifications to several initial implementation decisions.
Updates to the fixtures.

* fix: test polls upload

Refactored test to reduce duplicate code

* fix: allow api keys to be created for the new endpoints

* feat: add ability to view chatlog and polls documents. Show links in session materials.

* fix: commit new template

* fix: typo in migration signatures

* feat: add main doc page handling for polls. Improve tests.

* feat: chat log vue component + embedded vue loader

* feat: render polls using Vue

* fix: address pug syntax review comments from Nick.

* fix: repair remaining mention of chat log from copymunging

* fix: use double-quotes in html attributes

* fix: provide missing choices update migration

* test: silence html validator empty attr warnings

* test: fix test_runner config

* fix: locate session when looking at a dochistory object for polls or chatlog

Co-authored-by: Nicolas Giard <github@ngpixel.com>
2022-10-13 09:20:36 -05:00
Jennifer Richards 1366b6de38
Merge branch 'feat/tzaware' into jennifer/main-to-tzaware-conflicts 2022-09-14 12:36:33 -03:00
Robert Sparks d3f25a67b5
test: address data type issue in reg api tests. (#4428) 2022-09-09 10:34:59 -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 07bfa68a75
feat: explicitly model session attendance (#4025)
* feat: add model to track session attendance

* feat: add model to track session attendance

* feat: add api to set session attendees

* fix: use user pk instead off person pk in the attended api.

* feat: calculate three of five from attended

* feat: management utility to populate Attended model history

* docs: document why nomcom calculations don't use Attended yet.

* fix: add migration to add new personalapikey endpoint to choices

* test: verify very old last login prevents api key use,

* chore: address review nits

* chore: comment on some idiosyncracies of the expected input to populate_attended

* fix: add unique_together constraint for the Attended model

* fix: correctly handle empty querysets passed to three_of_five_eligible functions.
2022-06-20 10:46:36 -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
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 cf629a42ad And more fixes.
- Legacy-Id: 19877
2022-01-25 10:14:25 +00:00
Lars Eggert c68446ae93 More select2 and test fixes.
- Legacy-Id: 19781
2021-12-14 18:19:12 +00:00
Lars Eggert e9fd78128c Interim commit
- Legacy-Id: 19765
2021-12-09 18:26:53 +00: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
Jennifer Richards 81d9234d54 Use temporary directories instead of "real" filesystem for tests. Fixes #3414. Commit ready for merge.
- Legacy-Id: 19555
2021-11-05 19:45:57 +00:00
Robert Sparks 766a4638b2 Merged in [19344] from krathnayake@ietf.org:
Implements /api/appauth/authortools API endpoint. Fixes #3396.
 - Legacy-Id: 19364
Note: SVN reference [19344] has been migrated to Git commit dc833aa85c
2021-09-18 17:07:47 +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