fix: hide Email staff to create course link
- hide Email staff to create course link when DISABLE_COURSE_CREATION is set to True on backend.
- backend link: 0611c7891a/cms/djangoapps/contentstore/views/course.py (L1734C5-L1735C59).
- when DISABLE_COURSE_CREATION is set to True, it should not show staff email links.
- these links should also be disabled by default fr staff users.
This commit is contained in:
@@ -22,8 +22,10 @@ const HomeSidebar = () => {
|
||||
const { home: aboutHomeLink } = useHelpUrls(['home']);
|
||||
|
||||
// eslint-disable-next-line max-len
|
||||
const isShowMailToGetInstruction = courseCreatorStatus === COURSE_CREATOR_STATES.disallowedForThisSite
|
||||
&& !!studioRequestEmail;
|
||||
const isShowMailToGetInstruction = ![
|
||||
COURSE_CREATOR_STATES.disallowedForThisSite,
|
||||
COURSE_CREATOR_STATES.granted,
|
||||
].includes(courseCreatorStatus) && !!studioRequestEmail;
|
||||
const isShowUnrequestedInstruction = courseCreatorStatus === COURSE_CREATOR_STATES.unrequested;
|
||||
const isShowDeniedInstruction = courseCreatorStatus === COURSE_CREATOR_STATES.denied;
|
||||
|
||||
|
||||
@@ -69,7 +69,10 @@ const useStudioHome = () => {
|
||||
} = studioHomeData;
|
||||
|
||||
const isShowOrganizationDropdown = optimizationEnabled && courseCreatorStatus === COURSE_CREATOR_STATES.granted;
|
||||
const isShowEmailStaff = courseCreatorStatus === COURSE_CREATOR_STATES.disallowedForThisSite && !!studioRequestEmail;
|
||||
const isShowEmailStaff = ![
|
||||
COURSE_CREATOR_STATES.disallowedForThisSite,
|
||||
COURSE_CREATOR_STATES.granted,
|
||||
].includes(courseCreatorStatus) && !!studioRequestEmail;
|
||||
const isShowProcessing = allowCourseReruns && rerunCreatorStatus && inProcessCourseActions?.length > 0;
|
||||
const hasAbilityToCreateNewCourse = courseCreatorStatus === COURSE_CREATOR_STATES.granted;
|
||||
const anyQueryIsPending = [deleteNotificationSavingStatus, courseCreatorSavingStatus, savingCreateRerunStatus]
|
||||
|
||||
Reference in New Issue
Block a user