fix(vpaas) hide embed meeting for vpaas users

This commit is contained in:
Tudor-Ovidiu Avram 2020-09-23 12:09:07 +03:00 committed by Saúl Ibarra Corretgé
parent 993ded9936
commit ce4ef96941
2 changed files with 26 additions and 2 deletions

View File

@ -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:

View File

@ -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,