Skip to content

Commit

Permalink
feat: Drop HIDE_KICK_BUTTON_FOR_GUESTS setting.
Browse files Browse the repository at this point in the history
The main config contains disableRemoteMute and remoteVideoMenu: { disableKick: true} options, which can be used.
  • Loading branch information
damencho committed Nov 6, 2020
1 parent c2539bf commit 4b8aae9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 30 deletions.
5 changes: 0 additions & 5 deletions interface_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,6 @@ var interfaceConfig = {
*/
VIDEO_QUALITY_LABEL_DISABLED: false,

/**
* When enabled, the kick participant button will not be presented for users without a JWT
*/
// HIDE_KICK_BUTTON_FOR_GUESTS: false,

/**
* How many columns the tile view can expand to. The respected range is
* between 1 and 5.
Expand Down
27 changes: 2 additions & 25 deletions react/features/remote-video-menu/components/web/KickButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import React from 'react';

import { translate } from '../../../base/i18n';
import { IconKick } from '../../../base/icons';
import { connect } from '../../../base/redux';
import AbstractKickButton, {
type Props
} from '../AbstractKickButton';
Expand Down Expand Up @@ -42,11 +41,7 @@ class KickButton extends AbstractKickButton {
* @returns {ReactElement}
*/
render() {
const { participantID, t, visible } = this.props;

if (!visible) {
return null;
}
const { participantID, t } = this.props;

return (
<RemoteVideoMenuButton
Expand All @@ -61,22 +56,4 @@ class KickButton extends AbstractKickButton {

_handleClick: () => void
}

/**
* Maps (parts of) the redux state to {@link KickButton}'s React {@code Component}
* props.
*
* @param {Object} state - The redux store/state.
* @private
* @returns {Object}
*/
function _mapStateToProps(state: Object) {
const shouldHide = interfaceConfig.HIDE_KICK_BUTTON_FOR_GUESTS && state['features/base/jwt'].isGuest;

return {
visible: !shouldHide
};
}

export default translate(connect(_mapStateToProps)(KickButton));

export default translate(KickButton);

0 comments on commit 4b8aae9

Please sign in to comment.