You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting user.is_staff = True should be only done for sysadmins, but Radar does it for all teaching staff. Fix this and fix the code that assumes that teaching staff has it. Currently, teaching staff is able to access the Django admin view, thus they can read and modify more data than they should (e.g., someone else's courses). They could also break the system by deleting something important.
It looks like Radar could be able to limit the course list to only the teacher's own courses, but since all teachers are "staff" (admins), then all teachers see all courses.
STAFF_ROLES in setttings.py: this tells the django-lti-plugin library to make all teachers and assistants "staff" (admins). Radar STAFF_ROLES should be set to the empty list.
This line presumably should not filter for is_staff at all. If a user is a reviewer in the Radar course, they should be course staff in the A+ course. There is a potential problem, though. If the first() call returns a teaching assistant, then they have limited access in the A+ course and Radar could be unable to load course data from the A+ API (because the API token does not provide adequate privileges). Then, we would need a way to separate teaching assistants and teachers in Radar.
Setting
user.is_staff = True
should be only done for sysadmins, but Radar does it for all teaching staff. Fix this and fix the code that assumes that teaching staff has it. Currently, teaching staff is able to access the Django admin view, thus they can read and modify more data than they should (e.g., someone else's courses). They could also break the system by deleting something important.radar/data/models.py
Lines 33 to 36 in cb2b531
STAFF_ROLES
in setttings.py: this tells the django-lti-plugin library to make all teachers and assistants "staff" (admins). RadarSTAFF_ROLES
should be set to the empty list.radar/radar/settings.py
Lines 11 to 14 in cb2b531
is_staff
at all. If a user is a reviewer in the Radar course, they should be course staff in the A+ course. There is a potential problem, though. If thefirst()
call returns a teaching assistant, then they have limited access in the A+ course and Radar could be unable to load course data from the A+ API (because the API token does not provide adequate privileges). Then, we would need a way to separate teaching assistants and teachers in Radar.radar/provider/aplus.py
Lines 69 to 74 in cb2b531
radar/data/models.py
Line 50 in cb2b531
radar/ltilogin/receivers.py
Line 57 in cb2b531
The text was updated successfully, but these errors were encountered: