File tree Expand file tree Collapse file tree
components/events/partials/ModalTabsAndPages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,12 +32,7 @@ const SeriesDetailsAccessTab = ({
3232 const policyTemplateId = useAppSelector ( state => getPolicyTemplateId ( state ) ) ;
3333
3434 const orgProperties = useAppSelector ( state => getOrgProperties ( state ) ) ;
35-
36- const overrideEnabled = ( orgProperties [ 'admin.series.acl.event.update.mode' ] || 'optional' ) . toLowerCase ( ) === 'optional' ;
37-
38- const orgProperties = useAppSelector ( state => getOrgProperties ( state ) ) ;
39-
40- const overrideEnabled = ( orgProperties [ 'admin.series.acl.event.update.mode' ] || 'optional' ) . toLowerCase ( ) === 'optional' ;
35+ const overrideEnabled = ( orgProperties [ "admin.series.acl.event.update.mode" ] || "optional" ) . toLowerCase ( ) === "optional" ;
4136
4237 useEffect ( ( ) => {
4338 dispatch ( removeNotificationWizardForm ( ) ) ;
Original file line number Diff line number Diff line change 55 getSeriesDetailsExtendedMetadata ,
66 getStatistics ,
77} from "../selectors/seriesDetailsSelectors" ;
8+ import {
9+ getOrgProperties ,
10+ } from "../selectors/userInfoSelectors" ;
811import { addNotification } from "./notificationSlice" ;
912import {
1013 transformMetadataCollection ,
@@ -258,12 +261,19 @@ export const updateSeriesAccess = createAppAsyncThunk("seriesDetails/updateSerie
258261 id : Series [ "id" ] ,
259262 policies : { acl : Acl } ,
260263 override ?: boolean
261- } , { dispatch } ) => {
264+ } , { dispatch, getState } ) => {
262265 const { id, policies, override } = params ;
263266
264267 const data = new URLSearchParams ( ) ;
265268
266- const overrideString = override ? String ( true ) : String ( false ) ;
269+ // Here we should check for the "always" option as well, so that we can force override!
270+ const orgProperties = getOrgProperties ( getState ( ) ) ;
271+ const alwaysOverride = ( orgProperties [ "admin.series.acl.event.update.mode" ] || "optional" ) . toLowerCase ( ) === "always" ;
272+
273+ let overrideString = override ? String ( true ) : String ( false ) ;
274+ if ( alwaysOverride ) {
275+ overrideString = String ( true ) ;
276+ }
267277
268278 data . append ( "acl" , JSON . stringify ( policies ) ) ;
269279 data . append ( "override" , overrideString ) ;
You can’t perform that action at this time.
0 commit comments