Make impersonate_user local to a course
If a user is a super-user, they'll be able to impersonate anyone. If not, a user (ta) can impersonate a user who they have access to (student) in that particular course.
Note that when impersonating, a ta will only be able to access the
courses of that student that he/she has permission for. Access to
other courses will be denied. (Any urls starting with /course/
One possible issue with this approach is that a ta will be able to see the home page of the student, which means they'll be able to see the titles of some private courses that the student has access to.
Thanks for your work on this!
Could you merge in master to get the latest CI? Also, could you remind me what the status is here?
Codecov Report
Merging #670 into master will decrease coverage by
32.76%. The diff coverage is12.5%.
@@ Coverage Diff @@
## master #670 +/- ##
===========================================
- Coverage 96.59% 63.83% -32.77%
===========================================
Files 45 45
Lines 11105 11126 +21
Branches 2065 2072 +7
===========================================
- Hits 10727 7102 -3625
- Misses 302 3414 +3112
- Partials 76 610 +534
| Impacted Files | Coverage Δ | |
|---|---|---|
| relate/urls.py | 90.9% <ø> (-9.1%) |
:arrow_down: |
| course/auth.py | 24.8% <12.5%> (-59.69%) |
:arrow_down: |
| course/calendar.py | 20.17% <0%> (-79.83%) |
:arrow_down: |
| course/exam.py | 23.94% <0%> (-76.06%) |
:arrow_down: |
| course/enrollment.py | 25.94% <0%> (-72.88%) |
:arrow_down: |
| accounts/utils.py | 37.6% <0%> (-60.69%) |
:arrow_down: |
| course/views.py | 41.82% <0%> (-58.18%) |
:arrow_down: |
| relate/checks.py | 42.28% <0%> (-57.72%) |
:arrow_down: |
| course/validation.py | 50.65% <0%> (-49.17%) |
:arrow_down: |
| ... and 21 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 1be42ea...97cdba0. Read the comment docs.
Also, could you remind me what the status is here?
Need to write tests.