relate icon indicating copy to clipboard operation
relate copied to clipboard

Make impersonate_user local to a course

Open isuruf opened this issue 6 years ago • 4 comments

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.

isuruf avatar Sep 02 '19 21:09 isuruf

Thanks for your work on this!

inducer avatar Sep 03 '19 18:09 inducer

Could you merge in master to get the latest CI? Also, could you remind me what the status is here?

inducer avatar Sep 19 '19 01:09 inducer

Codecov Report

Merging #670 into master will decrease coverage by 32.76%. The diff coverage is 12.5%.

Impacted file tree graph

@@             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 data Powered by Codecov. Last update 1be42ea...97cdba0. Read the comment docs.

codecov[bot] avatar Sep 19 '19 01:09 codecov[bot]

Also, could you remind me what the status is here?

Need to write tests.

isuruf avatar Sep 19 '19 01:09 isuruf