Commit Graph

9 Commits

Author SHA1 Message Date
Usman Khalid
6cb62f2697 Rebase upgrade Django to v1.8.5
Please note that this is a squshed commit and the work of:
Symbolist, macdiesel, nedbat, doctoryes, muzaffaryousaf and muhammad-ammar
2015-11-10 15:00:19 -05:00
Will Daly
eefbf77edf Allow course staff to bypass embargo rules. 2015-07-23 08:26:43 -07:00
Ned Batchelder
78e9445aa1 Add super() calls to setUp/tearDown that are missing them
Also, I replaced a number of tearDown methods with addCleanup instead.
And also remove some unneeded patch.stopall() calls.
2015-05-14 18:14:21 -04:00
Clinton Blackburn
6a2b9f4521 Reorganized course_structures app
Celery requires all tasks to be in a tasks module. Also, the task has been updated to use default values if the the course structure generator encounters a block without the graded or format fields.
2015-03-10 11:12:51 -04:00
Will Daly
feed7eaada ECOM-1178: Embargo rules for continent codes.
This commit fixes a bug that could occur when GeoIP
returns a continent code ("EU" or "AN") instead of a
country code.  The previous implementation would
block users in this case since the country code
was not on the whitelist (consisting of all known
country codes).  The new implementation allows user
access by default if we don't recognize the country code.
2015-03-09 12:17:02 -04:00
Will Daly
ae8ddc8aee Deprecate old embargo implementation.
The new "country access" implementation replaces the old
implementation.  Middleware and tests have been updated
accordingly, but deprecated models are preserved
for backwards compatibility.
2015-02-23 15:48:04 -05:00
Will Daly
1624720f48 Stop hitting the database when no courses are blocked. 2015-02-20 14:17:14 -05:00
Will Daly
125f6957fc Skip country access check if feature flag is disabled 2015-02-13 08:57:37 -05:00
Will Daly
98ee3a5377 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.
2015-02-10 10:47:51 -05:00