Browse Source

fix(jaas) fix vpaas condition

j8
Tudor-Ovidiu Avram 3 years ago
parent
commit
420a7d8110

+ 1
- 1
connection.js View File

90
     const state = APP.store.getState();
90
     const state = APP.store.getState();
91
     let { jwt } = state['features/base/jwt'];
91
     let { jwt } = state['features/base/jwt'];
92
 
92
 
93
-    if (!jwt && isVpaasMeeting(state, false)) {
93
+    if (!jwt && isVpaasMeeting(state)) {
94
         jwt = await getJaasJWT(state);
94
         jwt = await getJaasJWT(state);
95
         APP.store.dispatch(setJWT(jwt));
95
         APP.store.dispatch(setJWT(jwt));
96
     }
96
     }

+ 2
- 9
react/features/billing-counter/functions.js View File

36
  * Returns true if the current meeting is a vpaas one.
36
  * Returns true if the current meeting is a vpaas one.
37
  *
37
  *
38
  * @param {Object} state - The state of the app.
38
  * @param {Object} state - The state of the app.
39
- * @param {boolean} requiredJwt - Whether jwt is required or not.
40
  * @returns {boolean}
39
  * @returns {boolean}
41
  */
40
  */
42
-export function isVpaasMeeting(state: Object, requiredJwt: boolean = true) {
43
-    const { billingCounterUrl, iAmRecorder, iAmSipGateway } = state['features/base/config'];
44
-    const { jwt } = state['features/base/jwt'];
45
-
46
-    const jwtBoolean = requiredJwt ? Boolean(jwt) : true;
47
-
48
-    const isAllowed = iAmRecorder || iAmSipGateway || jwtBoolean;
41
+export function isVpaasMeeting(state: Object) {
42
+    const { billingCounterUrl } = state['features/base/config'];
49
 
43
 
50
     return Boolean(
44
     return Boolean(
51
         billingCounterUrl
45
         billingCounterUrl
52
         && extractVpaasTenantFromPath(
46
         && extractVpaasTenantFromPath(
53
             state['features/base/connection'].locationURL.pathname)
47
             state['features/base/connection'].locationURL.pathname)
54
-        && isAllowed
55
     );
48
     );
56
 }
49
 }
57
 
50
 

+ 1
- 1
react/features/chrome-extension-banner/components/ChromeExtensionBanner.web.js View File

340
         bannerCfg: state['features/base/config'].chromeExtensionBanner || emptyObject,
340
         bannerCfg: state['features/base/config'].chromeExtensionBanner || emptyObject,
341
         conference: getCurrentConference(state),
341
         conference: getCurrentConference(state),
342
         iAmRecorder: state['features/base/config'].iAmRecorder,
342
         iAmRecorder: state['features/base/config'].iAmRecorder,
343
-        isVpaas: isVpaasMeeting(state, false)
343
+        isVpaas: isVpaasMeeting(state)
344
     };
344
     };
345
 };
345
 };
346
 
346
 

+ 1
- 1
react/features/invite/components/add-people-dialog/web/InviteContactsForm.js View File

592
     return {
592
     return {
593
         ..._abstractMapStateToProps(state),
593
         ..._abstractMapStateToProps(state),
594
         _footerTextEnabled: footerTextEnabled,
594
         _footerTextEnabled: footerTextEnabled,
595
-        _isVpaas: isVpaasMeeting(state, false)
595
+        _isVpaas: isVpaasMeeting(state)
596
     };
596
     };
597
 }
597
 }
598
 
598
 

Loading…
Cancel
Save