Skip to content

Commit

Permalink
feat: override course api perm to give data researcher progress page …
Browse files Browse the repository at this point in the history
…access
  • Loading branch information
tehreem-sadat committed Jan 7, 2025
1 parent 7f6318c commit 194bf8e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions futurex_openedx_extensions/helpers/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,11 @@ def ready(self) -> None:
from futurex_openedx_extensions.helpers import \
monkey_patches # pylint: disable=unused-import, import-outside-toplevel
from futurex_openedx_extensions.helpers import signals # pylint: disable=unused-import, import-outside-toplevel

from bridgekeeper import perms
from lms.djangoapps.courseware.rules import HasAccessRule, HasRolesRule
CAN_MASQUARADE_LEARNER_PROGRESS = 'course_home_api.can_masquarade_progress'
if CAN_MASQUARADE_LEARNER_PROGRESS in perms:
del perms[CAN_MASQUARADE_LEARNER_PROGRESS]
perms[CAN_MASQUARADE_LEARNER_PROGRESS] = HasAccessRule('staff') | HasAccessRule('data_researcher')

0 comments on commit 194bf8e

Please sign in to comment.