-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: override course api perm to give data researcher progress page …
…access
- Loading branch information
1 parent
7f6318c
commit 5f3a908
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
"""Mock bridgekeeper permission map""" | ||
|
||
|
||
perms = {} |
27 changes: 27 additions & 0 deletions
27
test_utils/edx_platform_mocks_shared/lms/djangoapps/courseware/rules.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""Mocked bridgekeepr lms rules""" | ||
|
||
|
||
class Rule: | ||
"""Mocked Base class for rules.""" | ||
def check(self, user, instance=None): | ||
"""Check if a user satisfies this rule.""" | ||
raise NotImplementedError() | ||
|
||
def __or__(self, other): | ||
return True | ||
|
||
|
||
class HasRolesRule(Rule): | ||
def __init__(self, *roles): | ||
self.roles = roles | ||
|
||
def check(self, user=None, instance=None): | ||
return True | ||
|
||
|
||
class HasAccessRule(Rule): | ||
def __init__(self, *roles): | ||
self.roles = roles | ||
|
||
def check(self, user=None, instance=None): | ||
return True |