Browse Source

fix(vpaas) hide embed meeting for vpaas users

master
Tudor-Ovidiu Avram 4 years ago
parent
commit
ce4ef96941

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

10
 import { JitsiRecordingConstants } from '../../../../base/lib-jitsi-meet';
10
 import { JitsiRecordingConstants } from '../../../../base/lib-jitsi-meet';
11
 import { getLocalParticipant } from '../../../../base/participants';
11
 import { getLocalParticipant } from '../../../../base/participants';
12
 import { connect } from '../../../../base/redux';
12
 import { connect } from '../../../../base/redux';
13
+import { isVpaasMeeting } from '../../../../billing-counter/functions';
13
 import EmbedMeetingTrigger from '../../../../embed-meeting/components/EmbedMeetingTrigger';
14
 import EmbedMeetingTrigger from '../../../../embed-meeting/components/EmbedMeetingTrigger';
14
 import { getActiveSession } from '../../../../recording';
15
 import { getActiveSession } from '../../../../recording';
15
 import { updateDialInNumbers } from '../../../actions';
16
 import { updateDialInNumbers } from '../../../actions';
36
      */
37
      */
37
     _dialIn: Object,
38
     _dialIn: Object,
38
 
39
 
40
+    /**
41
+     * Whether or not embed meeting should be visible.
42
+     */
43
+    _embedMeetingVisible: boolean,
44
+
39
     /**
45
     /**
40
      * Whether or not invite contacts should be visible.
46
      * Whether or not invite contacts should be visible.
41
      */
47
      */
80
 function AddPeopleDialog({
86
 function AddPeopleDialog({
81
     _conferenceName,
87
     _conferenceName,
82
     _dialIn,
88
     _dialIn,
89
+    _embedMeetingVisible,
83
     _inviteContactsVisible,
90
     _inviteContactsVisible,
84
     _inviteUrl,
91
     _inviteUrl,
85
     _liveStreamViewURL,
92
     _liveStreamViewURL,
152
                 <InviteByEmailSection
159
                 <InviteByEmailSection
153
                     inviteSubject = { inviteSubject }
160
                     inviteSubject = { inviteSubject }
154
                     inviteText = { invite } />
161
                     inviteText = { invite } />
155
-                <EmbedMeetingTrigger />
162
+                { _embedMeetingVisible && <EmbedMeetingTrigger /> }
156
                 <div className = 'invite-more-dialog separator' />
163
                 <div className = 'invite-more-dialog separator' />
157
                 {
164
                 {
158
                     _liveStreamViewURL
165
                     _liveStreamViewURL
191
     return {
198
     return {
192
         _conferenceName: getRoomName(state),
199
         _conferenceName: getRoomName(state),
193
         _dialIn: state['features/invite'],
200
         _dialIn: state['features/invite'],
201
+        _embedMeetingVisible: !isVpaasMeeting(state),
194
         _inviteContactsVisible: interfaceConfig.ENABLE_DIAL_OUT && !hideInviteContacts,
202
         _inviteContactsVisible: interfaceConfig.ENABLE_DIAL_OUT && !hideInviteContacts,
195
         _inviteUrl: getInviteURL(state),
203
         _inviteUrl: getInviteURL(state),
196
         _liveStreamViewURL:
204
         _liveStreamViewURL:

+ 17
- 1
react/features/toolbox/components/web/Toolbox.js View File

33
 import { connect, equals } from '../../../base/redux';
33
 import { connect, equals } from '../../../base/redux';
34
 import { OverflowMenuItem } from '../../../base/toolbox/components';
34
 import { OverflowMenuItem } from '../../../base/toolbox/components';
35
 import { getLocalVideoTrack, toggleScreensharing } from '../../../base/tracks';
35
 import { getLocalVideoTrack, toggleScreensharing } from '../../../base/tracks';
36
+import { isVpaasMeeting } from '../../../billing-counter/functions';
36
 import { VideoBlurButton } from '../../../blur';
37
 import { VideoBlurButton } from '../../../blur';
37
 import { CHAT_SIZE, ChatCounter, toggleChat } from '../../../chat';
38
 import { CHAT_SIZE, ChatCounter, toggleChat } from '../../../chat';
38
 import { EmbedMeetingDialog } from '../../../embed-meeting';
39
 import { EmbedMeetingDialog } from '../../../embed-meeting';
136
      */
137
      */
137
     _isGuest: boolean,
138
     _isGuest: boolean,
138
 
139
 
140
+    /**
141
+     * Whether or not the current meeting belongs to a JaaS user.
142
+     */
143
+    _isVpaasMeeting: boolean,
144
+
139
     /**
145
     /**
140
      * The ID of the local participant.
146
      * The ID of the local participant.
141
      */
147
      */
971
         );
977
         );
972
     }
978
     }
973
 
979
 
980
+    /**
981
+     * Returns true if the profile button is visible and false otherwise.
982
+     *
983
+     * @returns {boolean}
984
+     */
985
+    _isEmbedMeetingVisible() {
986
+        return !this.props._isVpaasMeeting && this._shouldShowButton('embedmeeting');
987
+    }
988
+
974
     /**
989
     /**
975
      * Returns true if the profile button is visible and false otherwise.
990
      * Returns true if the profile button is visible and false otherwise.
976
      *
991
      *
1047
                     key = 'stats'
1062
                     key = 'stats'
1048
                     onClick = { this._onToolbarOpenSpeakerStats }
1063
                     onClick = { this._onToolbarOpenSpeakerStats }
1049
                     text = { t('toolbar.speakerStats') } />,
1064
                     text = { t('toolbar.speakerStats') } />,
1050
-            this._shouldShowButton('embedmeeting')
1065
+            this._isEmbedMeetingVisible()
1051
                 && <OverflowMenuItem
1066
                 && <OverflowMenuItem
1052
                     accessibilityLabel = { t('toolbar.accessibilityLabel.embedMeeting') }
1067
                     accessibilityLabel = { t('toolbar.accessibilityLabel.embedMeeting') }
1053
                     icon = { IconCodeBlock }
1068
                     icon = { IconCodeBlock }
1433
         _dialog: Boolean(state['features/base/dialog'].component),
1448
         _dialog: Boolean(state['features/base/dialog'].component),
1434
         _feedbackConfigured: Boolean(callStatsID),
1449
         _feedbackConfigured: Boolean(callStatsID),
1435
         _isGuest: state['features/base/jwt'].isGuest,
1450
         _isGuest: state['features/base/jwt'].isGuest,
1451
+        _isVpaasMeeting: isVpaasMeeting(state),
1436
         _fullScreen: fullScreen,
1452
         _fullScreen: fullScreen,
1437
         _tileViewEnabled: shouldDisplayTileView(state),
1453
         _tileViewEnabled: shouldDisplayTileView(state),
1438
         _localParticipantID: localParticipant.id,
1454
         _localParticipantID: localParticipant.id,

Loading…
Cancel
Save