Skip to content

Ip filtering#724

Open
SimonAdamek wants to merge 9 commits intomrlvsb:masterfrom
SimonAdamek:ip-filtering
Open

Ip filtering#724
SimonAdamek wants to merge 9 commits intomrlvsb:masterfrom
SimonAdamek:ip-filtering

Conversation

@SimonAdamek
Copy link
Contributor

@SimonAdamek SimonAdamek commented Oct 23, 2025

Allow submission uploads and task viewing only from defined Classrooms IP ranges.

Models:

  • new model ClassroomIpRange - stores ip range of one classroom

EditTask page:

  • Added a new field displaying a list of classrooms (only for exam task type).
  • The list is searchable and sorted by checked/unchecked status, then alphabetically.

IP-based access control:

  • Added decorator to web/views/student.py
  • The API also checks IP addresses to prevent direct POST requests from unauthorized clients.

Administrator page:

  • Added custom form to add new classrooms based on IP address ranges or CIDR notation.
1 2 3

Related to #586

@SimonAdamek SimonAdamek force-pushed the ip-filtering branch 5 times, most recently from c3d6258 to 75d55af Compare October 25, 2025 20:37
@Kobzol
Copy link
Collaborator

Kobzol commented Oct 28, 2025

Hi, thanks for the PR! This looks really cool.

There is some functionality that is not strictly related to IP filtering, so it would be great to merge it separately. Could you split the change with the custom error pages to a separate PR please? In the error page it would be nice to use the normal layout and make it a "normal page", with the header, notifications and everything, so that it is not just a bare white page.

@Kobzol
Copy link
Collaborator

Kobzol commented Dec 6, 2025

This should be somehow combined with #787, so that we don't have two ways of combining rooms.

@Kobzol Kobzol mentioned this pull request Dec 6, 2025
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.

2 participants