CAS support.
Greetings. We (the Center for Pedagogical Mastery) are currently evaluating RELATE as an alternative to Open edX, (that is, we are hoping to get rid of it as soon as possible, because it's really not a good fit for how we teach, and RELATE appears to be much closer to ideal for us). To do that, the first thing we needed to do is to add support for authorization over CAS protocol, keeping it extensible for the unorthodox uses we've put it for. (We have a separate in-house system managing course subscriptions, which communicates which courses people should be subscribed to as CAS attributes, so the basic attribute mapper that django-cas-ng provides is insufficient.) This, of course, should be generally useful.
To that end, I present this PR, hoping you could accept it. It works, and passes all the tests that were there already, but I couldn't think of what kind of tests would be appropriate to test the new functionality. Should you deem it unsuitable, I'm ready to hack it until it is.
Btw, there were also a few complaints from the linter (Flake8): https://travis-ci.org/inducer/relate/jobs/520386819#L527
Could you look into addressing those, too?
Codecov Report
Merging #647 into master will decrease coverage by
0.25%. The diff coverage is0%.
@@ Coverage Diff @@
## master #647 +/- ##
==========================================
- Coverage 96.93% 96.67% -0.26%
==========================================
Files 45 48 +3
Lines 11097 11134 +37
Branches 2062 2071 +9
==========================================
+ Hits 10757 10764 +7
- Misses 292 317 +25
- Partials 48 53 +5
| Impacted Files | Coverage Δ | |
|---|---|---|
| relate/utils.py | 95.69% <ø> (ø) |
:arrow_up: |
| cas_config/__init__.py | 0% <0%> (ø) |
|
| cas_config/receivers.py | 0% <0%> (ø) |
|
| cas_config/apps.py | 0% <0%> (ø) |
|
| course/auth.py | 84.08% <0%> (-0.41%) |
:arrow_down: |
| relate/settings.py | 72.09% <0%> (-5.41%) |
:arrow_down: |
| relate/urls.py | 81.48% <0%> (-18.52%) |
:arrow_down: |
| course/page/text.py | 100% <0%> (ø) |
:arrow_up: |
| ... and 1 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 40c6715...799f5dc. Read the comment docs.
There, took care of all the linting issues.
Well, since I no longer work there, there's no point keeping this around.