fix: prevent slide upload by participants after session (#10582)#11258
Open
jimfenton wants to merge 2 commits into
Open
fix: prevent slide upload by participants after session (#10582)#11258jimfenton wants to merge 2 commits into
jimfenton wants to merge 2 commits into
Conversation
jimfenton
marked this pull request as draft
July 21, 2026 15:07
Collaborator
Author
|
I found another "Upload slides" button that isn't covered by this fix yet (materials/views.py line 1937). Will add. |
jimfenton
marked this pull request as ready for review
July 21, 2026 19:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restricts slide submission by other than those that can manage slides after the session has ended.
Does not include tests for this, and breaks two existing tests:
======================================================================
FAIL: test_propose_session_slides (ietf.meeting.tests_views.MaterialsTests.test_propose_session_slides)
Traceback (most recent call last):
File "/workspace/ietf/meeting/tests_views.py", line 7077, in test_propose_session_slides
self.assertTrue(q('.proposeslides'))
AssertionError: [] is not true
======================================================================
FAIL: test_submit_and_approve_multiple_versions (ietf.meeting.tests_views.MaterialsTests.test_submit_and_approve_multiple_versions)
Traceback (most recent call last):
File "/home/dev/.local/lib/python3.12/site-packages/django/test/utils.py", line 461, in inner
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/unittest/mock.py", line 1396, in patched
return func(*newargs, **newkeywargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/ietf/meeting/tests_views.py", line 7271, in test_submit_and_approve_multiple_versions
self.assertEqual(r.status_code, 302)
AssertionError: 403 != 302
Apparently this was because the sessions created for testing did not specify a time. I'm surprised this didn't fail before, because the submission would probably have violated the grace time after which Secretariat action is needed. I tried but didn't manage to succeed in fixing these test cases by adding a session time to the SessionFactory calls.