diff --git a/src/generic/create-or-rerun-course/hooks.jsx b/src/generic/create-or-rerun-course/hooks.jsx index 6807afdcf4..aac05171aa 100644 --- a/src/generic/create-or-rerun-course/hooks.jsx +++ b/src/generic/create-or-rerun-course/hooks.jsx @@ -27,12 +27,12 @@ const useCreateOrRerunCourse = (initialValues) => { const allOrganizations = useSelector(getOrganizations); const postErrors = useSelector(getPostErrors); const { - allowToCreateNewOrg, + canCreateOrganizations, allowedOrganizations, } = useSelector(getStudioHomeData); const [isFormFilled, setFormFilled] = useState(false); const [showErrorBanner, setShowErrorBanner] = useState(false); - const organizations = allowToCreateNewOrg ? allOrganizations : allowedOrganizations; + const organizations = canCreateOrganizations ? allOrganizations : allowedOrganizations; const { specialCharsRule, noSpaceRule } = REGEX_RULES; const validationSchema = Yup.object().shape({ @@ -78,7 +78,7 @@ const useCreateOrRerunCourse = (initialValues) => { }); useEffect(() => { - if (allowToCreateNewOrg) { + if (canCreateOrganizations) { dispatch(fetchOrganizationsQuery()); } }, []); diff --git a/src/studio-home/__mocks__/studioHomeMock.js b/src/studio-home/__mocks__/studioHomeMock.js index cc135f259a..25e210eee4 100644 --- a/src/studio-home/__mocks__/studioHomeMock.js +++ b/src/studio-home/__mocks__/studioHomeMock.js @@ -26,7 +26,7 @@ module.exports = { cmsLink: '//localhost:18010/courses/course-v1:Design+123+e.g.2025', }, ], - canCreateOrganizations: true, + canCreateOrganizations: false, courseCreatorStatus: 'granted', courses: [ {