diff --git a/src/components/events/partials/ModalTabsAndPages/SeriesDetailsAccessTab.tsx b/src/components/events/partials/ModalTabsAndPages/SeriesDetailsAccessTab.tsx index f4e5702e61..3612f043c2 100644 --- a/src/components/events/partials/ModalTabsAndPages/SeriesDetailsAccessTab.tsx +++ b/src/components/events/partials/ModalTabsAndPages/SeriesDetailsAccessTab.tsx @@ -9,6 +9,9 @@ import { import { removeNotificationWizardForm } from "../../../../slices/notificationSlice"; import { useAppDispatch, useAppSelector } from "../../../../store"; import { ParseKeys } from "i18next"; +import { + getOrgProperties, +} from "../../../../selectors/userInfoSelectors"; /** * This component manages the access policy tab of the series details modal @@ -29,6 +32,10 @@ const SeriesDetailsAccessTab = ({ const policies = useAppSelector(state => getSeriesDetailsAcl(state)); + const orgProperties = useAppSelector(state => getOrgProperties(state)); + + const overrideEnabled = (orgProperties['admin.series.acl.event.update.mode'] || 'optional').toLowerCase() === 'optional'; + useEffect(() => { dispatch(removeNotificationWizardForm()); // eslint-disable-next-line react-hooks/exhaustive-deps @@ -46,7 +53,7 @@ const SeriesDetailsAccessTab = ({ editAccessRole={"ROLE_UI_SERIES_DETAILS_ACL_EDIT"} policyChanged={policyChanged} setPolicyChanged={setPolicyChanged} - withOverrideButton={true} + withOverrideButton={overrideEnabled} /> ); }; diff --git a/src/components/shared/SaveEditFooter.tsx b/src/components/shared/SaveEditFooter.tsx index 929bde5559..dbcf02c6e3 100644 --- a/src/components/shared/SaveEditFooter.tsx +++ b/src/components/shared/SaveEditFooter.tsx @@ -8,6 +8,7 @@ type SaveEditFooterProps = { reset: () => void; submit: () => void; isValid?: boolean; + customSaveButtonText?: ParseKeys; additionalButton?: { label: ParseKeys, hint: ParseKeys, @@ -20,10 +21,13 @@ export const SaveEditFooter: React.FC = ({ reset, submit, isValid, - additionalButton + customSaveButtonText, + additionalButton, }) => { const { t } = useTranslation(); + const saveButtonText = customSaveButtonText || "SAVE"; + return ; } diff --git a/src/components/shared/modals/ResourceDetailsAccessPolicyTab.tsx b/src/components/shared/modals/ResourceDetailsAccessPolicyTab.tsx index ab94b06df1..c22bdaacaf 100644 --- a/src/components/shared/modals/ResourceDetailsAccessPolicyTab.tsx +++ b/src/components/shared/modals/ResourceDetailsAccessPolicyTab.tsx @@ -658,6 +658,7 @@ const ResourceDetailsAccessPolicyTab = ({ hint: "EVENTS.SERIES.DETAILS.ACCESS.ACCESS_POLICY.REPLACE_EVENT_ACLS_HINT", onClick: () => saveAccess(formik.values, true) } : undefined} + customSaveButtonText={withOverrideButton ? "EVENTS.SERIES.DETAILS.ACCESS.ACCESS_POLICY.SAVE_SERIES_ACL_ONLY" : undefined} />} )} diff --git a/src/i18n/org/opencastproject/adminui/languages/lang-en_US.json b/src/i18n/org/opencastproject/adminui/languages/lang-en_US.json index e33f8e9db3..4398bf0782 100644 --- a/src/i18n/org/opencastproject/adminui/languages/lang-en_US.json +++ b/src/i18n/org/opencastproject/adminui/languages/lang-en_US.json @@ -1212,8 +1212,9 @@ "ACTION": "Actions", "NEW": "New policy", "DETAILS": "Details", - "REPLACE_EVENT_ACLS": "Update series permissions", - "REPLACE_EVENT_ACLS_HINT": "Ensure all events of this series have these permissions in effect", + "REPLACE_EVENT_ACLS": "Save series and overwrite event permissions", + "REPLACE_EVENT_ACLS_HINT": "Save the series permissions and overwrite the permissions for all events in this series.", + "SAVE_SERIES_ACL_ONLY": "Save series permission", "LOAD_MORE_LIMIT": "policies shown.", "LOAD_MORE_LINK": "Load more" },