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:
12
src/data/selectors/special.js
Normal file
12
src/data/selectors/special.js
Normal 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;
|
||||
Reference in New Issue
Block a user