Skip to content

Commit

Permalink
feat: add limit-staff support, and hide fx_api roles
Browse files Browse the repository at this point in the history
  • Loading branch information
shadinaif committed Jan 15, 2025
1 parent a5ddebd commit d17caf4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions futurex_openedx_extensions/helpers/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
COURSE_FX_API_ACCESS_ROLE = 'fx_api_access'
COURSE_FX_API_ACCESS_ROLE_GLOBAL = 'fx_api_access_global'

COURSE_ACCESS_ROLES_SUPPORTED_BUT_HIDDEN = [
COURSE_FX_API_ACCESS_ROLE,
COURSE_FX_API_ACCESS_ROLE_GLOBAL,
]

COURSE_ACCESS_ROLES_USER_VIEW_MAPPING = [
COURSE_FX_API_ACCESS_ROLE,
COURSE_FX_API_ACCESS_ROLE_GLOBAL
Expand All @@ -76,6 +81,7 @@
COURSE_ACCESS_ROLES_TENANT_OR_COURSE = [
'data_researcher',
'instructor',
'limit-staff',
COURSE_ACCESS_ROLES_LIBRARY_USER,
COURSE_ACCESS_ROLES_STAFF_EDITOR,
COURSE_FX_API_ACCESS_ROLE,
Expand All @@ -90,11 +96,11 @@
COURSE_ACCESS_ROLES_COURSE_ONLY +
COURSE_ACCESS_ROLES_TENANT_ONLY +
COURSE_ACCESS_ROLES_TENANT_OR_COURSE
) - {COURSE_FX_API_ACCESS_ROLE})
) - set(COURSE_ACCESS_ROLES_SUPPORTED_BUT_HIDDEN))

COURSE_ACCESS_ROLES_SUPPORTED_READ = list(
set(COURSE_ACCESS_ROLES_SUPPORTED_EDIT + COURSE_ACCESS_ROLES_GLOBAL) |
{COURSE_FX_API_ACCESS_ROLE}
set(COURSE_ACCESS_ROLES_SUPPORTED_BUT_HIDDEN)
)

COURSE_ACCESS_ROLES_ACCEPT_COURSE_ID = COURSE_ACCESS_ROLES_COURSE_ONLY + COURSE_ACCESS_ROLES_TENANT_OR_COURSE
Expand Down

0 comments on commit d17caf4

Please sign in to comment.