File tree Expand file tree Collapse file tree 4 files changed +18
-5
lines changed
events/partials/ModalTabsAndPages
i18n/org/opencastproject/adminui/languages Expand file tree Collapse file tree 4 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 99import { removeNotificationWizardForm } from "../../../../slices/notificationSlice" ;
1010import { useAppDispatch , useAppSelector } from "../../../../store" ;
1111import { ParseKeys } from "i18next" ;
12+ import {
13+ getOrgProperties ,
14+ } from "../../../../selectors/userInfoSelectors" ;
1215
1316/**
1417 * This component manages the access policy tab of the series details modal
@@ -29,6 +32,10 @@ const SeriesDetailsAccessTab = ({
2932
3033 const policies = useAppSelector ( state => getSeriesDetailsAcl ( state ) ) ;
3134
35+ const orgProperties = useAppSelector ( state => getOrgProperties ( state ) ) ;
36+
37+ const overrideEnabled = ( orgProperties [ 'admin.series.acl.event.update.mode' ] || 'optional' ) . toLowerCase ( ) === 'optional' ;
38+
3239 useEffect ( ( ) => {
3340 dispatch ( removeNotificationWizardForm ( ) ) ;
3441 // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -46,7 +53,7 @@ const SeriesDetailsAccessTab = ({
4653 editAccessRole = { "ROLE_UI_SERIES_DETAILS_ACL_EDIT" }
4754 policyChanged = { policyChanged }
4855 setPolicyChanged = { setPolicyChanged }
49- withOverrideButton = { true }
56+ withOverrideButton = { overrideEnabled }
5057 />
5158 ) ;
5259} ;
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ type SaveEditFooterProps = {
88 reset : ( ) => void ;
99 submit : ( ) => void ;
1010 isValid ?: boolean ;
11+ customSaveButtonText ?: ParseKeys ;
1112 additionalButton ?: {
1213 label : ParseKeys ,
1314 hint : ParseKeys ,
@@ -20,10 +21,13 @@ export const SaveEditFooter: React.FC<SaveEditFooterProps> = ({
2021 reset,
2122 submit,
2223 isValid,
23- additionalButton
24+ customSaveButtonText,
25+ additionalButton,
2426} ) => {
2527 const { t } = useTranslation ( ) ;
2628
29+ const saveButtonText = customSaveButtonText || "SAVE" ;
30+
2731 return < footer style = { { padding : "0 15px" } } >
2832 { active && isValid && (
2933 < div className = "pull-left" >
@@ -56,7 +60,7 @@ export const SaveEditFooter: React.FC<SaveEditFooterProps> = ({
5660 className = { `save green ${
5761 ! isValid || ! active ? "disabled" : ""
5862 } `}
59- > { t ( "SAVE" ) } </ BaseButton >
63+ > { t ( saveButtonText ) } </ BaseButton >
6064 </ div >
6165 </ footer > ;
6266}
Original file line number Diff line number Diff line change @@ -658,6 +658,7 @@ const ResourceDetailsAccessPolicyTab = ({
658658 hint : "EVENTS.SERIES.DETAILS.ACCESS.ACCESS_POLICY.REPLACE_EVENT_ACLS_HINT" ,
659659 onClick : ( ) => saveAccess ( formik . values , true )
660660 } : undefined }
661+ customSaveButtonText = { withOverrideButton ? "EVENTS.SERIES.DETAILS.ACCESS.ACCESS_POLICY.SAVE_SERIES_ACL_ONLY" : undefined }
661662 /> }
662663 </ div >
663664 ) }
Original file line number Diff line number Diff line change 12121212 "ACTION" : " Actions" ,
12131213 "NEW" : " New policy" ,
12141214 "DETAILS" : " Details" ,
1215- "REPLACE_EVENT_ACLS" : " Update series permissions" ,
1216- "REPLACE_EVENT_ACLS_HINT" : " Ensure all events of this series have these permissions in effect" ,
1215+ "REPLACE_EVENT_ACLS" : " Save series and overwrite event permissions" ,
1216+ "REPLACE_EVENT_ACLS_HINT" : " Save the series permissions and overwrite the permissions for all events in this series." ,
1217+ "SAVE_SERIES_ACL_ONLY" : " Save series permission" ,
12171218 "LOAD_MORE_LIMIT" : " policies shown." ,
12181219 "LOAD_MORE_LINK" : " Load more"
12191220 },
You can’t perform that action at this time.
0 commit comments