fix(toolbar): show profile button if guest

If authenticated using JWT, don't show the profile button but
do show it if a guest.
This commit is contained in:
Leonard Kim 2018-05-14 09:22:38 -07:00 committed by Дамян Минков
parent 39ba83131b
commit e649ae9016
1 changed files with 9 additions and 1 deletions

View File

@ -99,6 +99,11 @@ type Props = {
*/
_hideInviteButton: boolean,
/**
* Whether or not the current user is logged in through a JWT.
*/
_isGuest: boolean,
/**
* Whether or not the conference is currently being recorded by the local
* participant.
@ -942,12 +947,14 @@ class Toolbox extends Component<Props, State> {
_etherpadInitialized,
_feedbackConfigured,
_fullScreen,
_isGuest,
_sharingVideo,
t
} = this.props;
return [
this._shouldShowButton('profile')
_isGuest
&& this._shouldShowButton('profile')
&& <OverflowMenuProfileItem
key = 'profile'
onClick = { this._onToolbarToggleProfile } />,
@ -1121,6 +1128,7 @@ function _mapStateToProps(state) {
_feedbackConfigured: Boolean(callStatsID),
_hideInviteButton:
iAmRecorder || (!addPeopleEnabled && !dialOutEnabled),
_isGuest: state['features/base/jwt'].isGuest,
_isRecording: isRecording,
_fullScreen: fullScreen,
_localParticipantID: localParticipant.id,