Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(jaas) fix vpaas condition

Tudor-Ovidiu Avram420a7d811060
diff --git a/connection.js b/connection.js
index 35d80c1a6b..095edf1e20 100644
--- a/connection.js
+++ b/connection.js
@@ -90,7 +90,7 @@ export async function connect(id, password, roomName) {
const state = APP.store.getState();
let { jwt } = state['features/base/jwt'];
- if (!jwt && isVpaasMeeting(state, false)) {
+ if (!jwt && isVpaasMeeting(state)) {
jwt = await getJaasJWT(state);
APP.store.dispatch(setJWT(jwt));
}
diff --git a/react/features/billing-counter/functions.js b/react/features/billing-counter/functions.js
index dd9d55826b..3f3a56938c 100644
--- a/react/features/billing-counter/functions.js
+++ b/react/features/billing-counter/functions.js
@@ -36,22 +36,15 @@ export function getVpaasTenant(state: Object) {
* Returns true if the current meeting is a vpaas one.
*
* @param {Object} state - The state of the app.
- * @param {boolean} requiredJwt - Whether jwt is required or not.
* @returns {boolean}
*/
-export function isVpaasMeeting(state: Object, requiredJwt: boolean = true) {
- const { billingCounterUrl, iAmRecorder, iAmSipGateway } = state['features/base/config'];
- const { jwt } = state['features/base/jwt'];
-
- const jwtBoolean = requiredJwt ? Boolean(jwt) : true;
-
- const isAllowed = iAmRecorder || iAmSipGateway || jwtBoolean;
+export function isVpaasMeeting(state: Object) {
+ const { billingCounterUrl } = state['features/base/config'];
return Boolean(
billingCounterUrl
&& extractVpaasTenantFromPath(
state['features/base/connection'].locationURL.pathname)
- && isAllowed
);
}
diff --git a/react/features/chrome-extension-banner/components/ChromeExtensionBanner.web.js b/react/features/chrome-extension-banner/components/ChromeExtensionBanner.web.js
index 73d4a7dc0d..903bfa28e9 100644
--- a/react/features/chrome-extension-banner/components/ChromeExtensionBanner.web.js
+++ b/react/features/chrome-extension-banner/components/ChromeExtensionBanner.web.js
@@ -340,7 +340,7 @@ const _mapStateToProps = state => {
bannerCfg: state['features/base/config'].chromeExtensionBanner || emptyObject,
conference: getCurrentConference(state),
iAmRecorder: state['features/base/config'].iAmRecorder,
- isVpaas: isVpaasMeeting(state, false)
+ isVpaas: isVpaasMeeting(state)
};
};
diff --git a/react/features/invite/components/add-people-dialog/web/InviteContactsForm.js b/react/features/invite/components/add-people-dialog/web/InviteContactsForm.js
index b50081479e..0bb0dff06c 100644
--- a/react/features/invite/components/add-people-dialog/web/InviteContactsForm.js
+++ b/react/features/invite/components/add-people-dialog/web/InviteContactsForm.js
@@ -592,7 +592,7 @@ function _mapStateToProps(state) {
return {
..._abstractMapStateToProps(state),
_footerTextEnabled: footerTextEnabled,
- _isVpaas: isVpaasMeeting(state, false)
+ _isVpaas: isVpaasMeeting(state)
};
}