Commit graph

84 commits

Author SHA1 Message Date
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
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 724e982a1c Added documentation of the OpenID Connect and version endpoints to /api/. Added some tests.
- Legacy-Id: 18487
2020-09-11 14:13:45 +00:00
Henrik Levkowetz 95bca1dbed Updated the bluesheet submission API tests slightly, to check correct handling of updates.
- Legacy-Id: 18447
2020-08-30 19:41:55 +00:00
Henrik Levkowetz da7c22f710 Added html.escape() in a test case in order to correctly handle affiliation names with ampersands.
- Legacy-Id: 18420
2020-08-26 16:04:50 +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 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 9910d1ecf0 Added the use of local test directories instead of default settings for bluesheet files in the bluesheet upload API test.
- Legacy-Id: 18069
2020-06-26 15:37:21 +00:00
Henrik Levkowetz 3a76e4a935 Added an API endpoint for bluesheet information upload. Factored out code in common with manual upload_session_bluesheets(). Tweaked ietf.secr.proceedings.utils.handle_upload_file() to handle temp files in addition to http file objects, to support the API endpoint.
- Legacy-Id: 18067
2020-06-26 14:49:13 +00:00
Henrik Levkowetz ddf874bc77 Fixed an issue in a test function that could occasionally fail incorrectly.
- Legacy-Id: 18045
2020-06-24 11:07:11 +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 980de4fac0 Removed an unused import
- Legacy-Id: 17959
2020-06-10 11:32:24 +00:00