Allow special access to bulk management tools (#165)

Access is configured on a per-course-run basis
via the new setting:
`BULK_MANAGEMENT_SPECIAL_ACCESS_COURSE_IDS`

TNL-7901
This commit is contained in:
Kyle McCormick
2021-01-25 17:20:21 -05:00
committed by GitHub
parent e9f01ea3a3
commit 84f1efefb3
4 changed files with 21 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
// Certain course runs may be expressly allowed to view the
// bulk management tools, bypassing the other checks.
// Note that this does not affect whether or not the backend
// LMS API will permit usage of the tool.
const hasSpecialBulkManagementAccess = courseId => {
const specialIdList = process.env.BULK_MANAGEMENT_SPECIAL_ACCESS_COURSE_IDS || '';
return specialIdList.split(',').includes(courseId);
};
export { hasSpecialBulkManagementAccess };
export default hasSpecialBulkManagementAccess;