Browse Source

fix(jaas) fix vpaas condition

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

+ 1
- 1
connection.js View File

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

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

@@ -36,22 +36,15 @@ export function getVpaasTenant(state: Object) {
36 36
  * Returns true if the current meeting is a vpaas one.
37 37
  *
38 38
  * @param {Object} state - The state of the app.
39
- * @param {boolean} requiredJwt - Whether jwt is required or not.
40 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 44
     return Boolean(
51 45
         billingCounterUrl
52 46
         && extractVpaasTenantFromPath(
53 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,7 +340,7 @@ const _mapStateToProps = state => {
340 340
         bannerCfg: state['features/base/config'].chromeExtensionBanner || emptyObject,
341 341
         conference: getCurrentConference(state),
342 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,7 +592,7 @@ function _mapStateToProps(state) {
592 592
     return {
593 593
         ..._abstractMapStateToProps(state),
594 594
         _footerTextEnabled: footerTextEnabled,
595
-        _isVpaas: isVpaasMeeting(state, false)
595
+        _isVpaas: isVpaasMeeting(state)
596 596
     };
597 597
 }
598 598
 

Loading…
Cancel
Save