Skip to content

Commit

Permalink
add admin access
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeseibel committed Jan 14, 2025
1 parent ac5710d commit 981d7d7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions blti/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
LTI_DATA_CLAIM_BASE = 'https://purl.imsglobal.org/spec/lti/claim/'


# System Admin role is across all contexts (courses)
class SystemAdministratorRole(AbstractRole):
_institution_roles = ("Administrator")
_common_roles = ("Administrator")


# Instructor and student roles are specific to the given context (course)
class TeacherRole(AbstractRole):
_common_roles = ("Instructor", "Administrator")
Expand Down Expand Up @@ -39,6 +45,7 @@ def __init__(self, **data):

self.is_administrator = self._1p1_roles(
['admin']) or (
SystemAdministratorRole(self._data).check() or
TeacherRole(self._data).check() or
TeachingAssistantRole(self._data).check() or
DesignerRole(self._data).check())
Expand Down

0 comments on commit 981d7d7

Please sign in to comment.