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(vpaas) hide embed meeting for vpaas users

Tudor-Ovidiu Avramce4ef969413f
diff --git a/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js b/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js
index cc3112e2a0..f53c1860d7 100644
--- a/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js
+++ b/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js
@@ -10,6 +10,7 @@ import { translate } from '../../../../base/i18n';
import { JitsiRecordingConstants } from '../../../../base/lib-jitsi-meet';
import { getLocalParticipant } from '../../../../base/participants';
import { connect } from '../../../../base/redux';
+import { isVpaasMeeting } from '../../../../billing-counter/functions';
import EmbedMeetingTrigger from '../../../../embed-meeting/components/EmbedMeetingTrigger';
import { getActiveSession } from '../../../../recording';
import { updateDialInNumbers } from '../../../actions';
@@ -36,6 +37,11 @@ type Props = {
*/
_dialIn: Object,
+ /**
+ * Whether or not embed meeting should be visible.
+ */
+ _embedMeetingVisible: boolean,
+
/**
* Whether or not invite contacts should be visible.
*/
@@ -80,6 +86,7 @@ type Props = {
function AddPeopleDialog({
_conferenceName,
_dialIn,
+ _embedMeetingVisible,
_inviteContactsVisible,
_inviteUrl,
_liveStreamViewURL,
@@ -152,7 +159,7 @@ function AddPeopleDialog({
<InviteByEmailSection
inviteSubject = { inviteSubject }
inviteText = { invite } />
- <EmbedMeetingTrigger />
+ { _embedMeetingVisible && <EmbedMeetingTrigger /> }
<div className = 'invite-more-dialog separator' />
{
_liveStreamViewURL
@@ -191,6 +198,7 @@ function mapStateToProps(state) {
return {
_conferenceName: getRoomName(state),
_dialIn: state['features/invite'],
+ _embedMeetingVisible: !isVpaasMeeting(state),
_inviteContactsVisible: interfaceConfig.ENABLE_DIAL_OUT && !hideInviteContacts,
_inviteUrl: getInviteURL(state),
_liveStreamViewURL:
diff --git a/react/features/toolbox/components/web/Toolbox.js b/react/features/toolbox/components/web/Toolbox.js
index 933540fc8e..fbf6cc8e6c 100644
--- a/react/features/toolbox/components/web/Toolbox.js
+++ b/react/features/toolbox/components/web/Toolbox.js
@@ -33,6 +33,7 @@ import {
import { connect, equals } from '../../../base/redux';
import { OverflowMenuItem } from '../../../base/toolbox/components';
import { getLocalVideoTrack, toggleScreensharing } from '../../../base/tracks';
+import { isVpaasMeeting } from '../../../billing-counter/functions';
import { VideoBlurButton } from '../../../blur';
import { CHAT_SIZE, ChatCounter, toggleChat } from '../../../chat';
import { EmbedMeetingDialog } from '../../../embed-meeting';
@@ -136,6 +137,11 @@ type Props = {
*/
_isGuest: boolean,
+ /**
+ * Whether or not the current meeting belongs to a JaaS user.
+ */
+ _isVpaasMeeting: boolean,
+
/**
* The ID of the local participant.
*/
@@ -971,6 +977,15 @@ class Toolbox extends Component<Props, State> {
);
}
+ /**
+ * Returns true if the profile button is visible and false otherwise.
+ *
+ * @returns {boolean}
+ */
+ _isEmbedMeetingVisible() {
+ return !this.props._isVpaasMeeting && this._shouldShowButton('embedmeeting');
+ }
+
/**
* Returns true if the profile button is visible and false otherwise.
*
@@ -1047,7 +1062,7 @@ class Toolbox extends Component<Props, State> {
key = 'stats'
onClick = { this._onToolbarOpenSpeakerStats }
text = { t('toolbar.speakerStats') } />,
- this._shouldShowButton('embedmeeting')
+ this._isEmbedMeetingVisible()
&& <OverflowMenuItem
accessibilityLabel = { t('toolbar.accessibilityLabel.embedMeeting') }
icon = { IconCodeBlock }
@@ -1433,6 +1448,7 @@ function _mapStateToProps(state) {
_dialog: Boolean(state['features/base/dialog'].component),
_feedbackConfigured: Boolean(callStatsID),
_isGuest: state['features/base/jwt'].isGuest,
+ _isVpaasMeeting: isVpaasMeeting(state),
_fullScreen: fullScreen,
_tileViewEnabled: shouldDisplayTileView(state),
_localParticipantID: localParticipant.id,