Skip to content

Commit 3ca0643

Browse files
committed
Merge branch 'series-acl-not-copied-in-new-event-wizard' of ypatios/opencast-admin-interface into r/19.x
Pull request #1519 Fixes #1518 fix formik metadata reference according to new scheme
2 parents a89c999 + dedc340 commit 3ca0643

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

src/components/events/partials/ModalTabsAndPages/NewAccessPage.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ import ModalContentTable from "../../../shared/modals/ModalContentTable";
2424
* This component renders the access page for new events and series in the wizards.
2525
*/
2626
interface RequiredFormProps {
27-
"dublincore/episode_isPartOf": string,
28-
policies: TransformedAcl[],
29-
aclTemplate: string,
30-
// theme: string,
27+
metadata: {
28+
"dublincore/episode_isPartOf": string,
29+
},
30+
policies: TransformedAcl[],
31+
aclTemplate: string,
32+
// theme: string,
3133
}
3234

3335
const NewAccessPage = <T extends RequiredFormProps>({
@@ -76,15 +78,15 @@ const NewAccessPage = <T extends RequiredFormProps>({
7678

7779
// If we have to use series ACL, fetch it
7880
useEffect(() => {
79-
if (initEventAclWithSeriesAcl && formik.values["dublincore/episode_isPartOf"]) {
80-
dispatch(fetchSeriesDetailsAcls(formik.values["dublincore/episode_isPartOf"]));
81+
if (initEventAclWithSeriesAcl && formik.values.metadata["dublincore/episode_isPartOf"]) {
82+
dispatch(fetchSeriesDetailsAcls(formik.values.metadata["dublincore/episode_isPartOf"]));
8183
}
8284
// eslint-disable-next-line react-hooks/exhaustive-deps
83-
}, [formik.values["dublincore/episode_isPartOf"], initEventAclWithSeriesAcl, dispatch]);
85+
}, [formik.values.metadata["dublincore/episode_isPartOf"], initEventAclWithSeriesAcl, dispatch]);
8486

8587
// If we have to use series ACL, overwrite existing rules
8688
useEffect(() => {
87-
if (initEventAclWithSeriesAcl && formik.values["dublincore/episode_isPartOf"] && seriesAcl) {
89+
if (initEventAclWithSeriesAcl && formik.values.metadata["dublincore/episode_isPartOf"] && seriesAcl) {
8890
formik.setFieldValue("policies", seriesAcl);
8991
}
9092
// eslint-disable-next-line react-hooks/exhaustive-deps

0 commit comments

Comments
 (0)