Skip to content

fix: prevent slide upload by participants after session (#10582)#11258

Open
jimfenton wants to merge 2 commits into
ietf-tools:mainfrom
jimfenton:slide_permission
Open

fix: prevent slide upload by participants after session (#10582)#11258
jimfenton wants to merge 2 commits into
ietf-tools:mainfrom
jimfenton:slide_permission

Conversation

@jimfenton

Copy link
Copy Markdown
Collaborator

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.

@jimfenton
jimfenton marked this pull request as draft July 21, 2026 15:07
@jimfenton

Copy link
Copy Markdown
Collaborator Author

I found another "Upload slides" button that isn't covered by this fix yet (materials/views.py line 1937). Will add.

@jimfenton
jimfenton marked this pull request as ready for review July 21, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant