Implement IP filtering in embargo middleware.
Add history table for course access rule changes. Provide test utility for simulating restricted access. Provide `redirect_if_blocked` method for integration with other parts of the system (will be used for blocking enrollment). Add info-level logging explaining when and why users are blocked.
Showing
- common/djangoapps/embargo/api.py 103 additions, 38 deletionscommon/djangoapps/embargo/api.py
- common/djangoapps/embargo/exceptions.py 11 additions, 0 deletionscommon/djangoapps/embargo/exceptions.py
- common/djangoapps/embargo/middleware.py 103 additions, 18 deletionscommon/djangoapps/embargo/middleware.py
- common/djangoapps/embargo/migrations/0005_add_courseaccessrulehistory.py 114 additions, 0 deletions...ps/embargo/migrations/0005_add_courseaccessrulehistory.py
- common/djangoapps/embargo/models.py 311 additions, 47 deletionscommon/djangoapps/embargo/models.py
- common/djangoapps/embargo/test_utils.py 82 additions, 0 deletionscommon/djangoapps/embargo/test_utils.py
- common/djangoapps/embargo/tests/test_api.py 251 additions, 0 deletionscommon/djangoapps/embargo/tests/test_api.py
- common/djangoapps/embargo/tests/test_middleware_access_rules.py 129 additions, 241 deletions.../djangoapps/embargo/tests/test_middleware_access_rules.py
- common/djangoapps/embargo/tests/test_models.py 148 additions, 35 deletionscommon/djangoapps/embargo/tests/test_models.py
Loading
Please register or sign in to comment