feat(config):InsecureRoomNameWarning config option
This commit is contained in:
parent
78b01d2c97
commit
f0c6e934ce
|
@ -50,8 +50,9 @@ export default class AbstractInsecureRoomNameLabel extends PureComponent<Props>
|
||||||
*/
|
*/
|
||||||
export function _mapStateToProps(state: Object): $Shape<Props> {
|
export function _mapStateToProps(state: Object): $Shape<Props> {
|
||||||
const { room } = state['features/base/conference'];
|
const { room } = state['features/base/conference'];
|
||||||
|
const { enableInsecureRoomNameWarning = false } = state['features/base/config'];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_visible: room && isInsecureRoomName(room)
|
_visible: enableInsecureRoomNameWarning && room && isInsecureRoomName(room)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,11 @@ type Props = {
|
||||||
*/
|
*/
|
||||||
_calendarEnabled: boolean,
|
_calendarEnabled: boolean,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the insecure room name functionality is enabled or not.
|
||||||
|
*/
|
||||||
|
_enableInsecureRoomNameWarning: boolean,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the recent list is enabled
|
* Whether the recent list is enabled
|
||||||
*/
|
*/
|
||||||
|
@ -214,7 +219,7 @@ export class AbstractWelcomePage extends Component<Props, *> {
|
||||||
_onRoomChange(value: string) {
|
_onRoomChange(value: string) {
|
||||||
this.setState({
|
this.setState({
|
||||||
room: value,
|
room: value,
|
||||||
insecureRoomName: value && isInsecureRoomName(value)
|
insecureRoomName: this.props._enableInsecureRoomNameWarning && value && isInsecureRoomName(value)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,7 +231,7 @@ export class AbstractWelcomePage extends Component<Props, *> {
|
||||||
* @returns {ReactElement}
|
* @returns {ReactElement}
|
||||||
*/
|
*/
|
||||||
_renderInsecureRoomNameWarning() {
|
_renderInsecureRoomNameWarning() {
|
||||||
if (this.state.insecureRoomName) {
|
if (this.props._enableInsecureRoomNameWarning && this.state.insecureRoomName) {
|
||||||
return this._doRenderInsecureRoomNameWarning();
|
return this._doRenderInsecureRoomNameWarning();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,6 +278,7 @@ export class AbstractWelcomePage extends Component<Props, *> {
|
||||||
export function _mapStateToProps(state: Object) {
|
export function _mapStateToProps(state: Object) {
|
||||||
return {
|
return {
|
||||||
_calendarEnabled: isCalendarEnabled(state),
|
_calendarEnabled: isCalendarEnabled(state),
|
||||||
|
_enableInsecureRoomNameWarning: state['features/base/config'].enableInsecureRoomNameWarning || false,
|
||||||
_recentListEnabled: isRecentListEnabled(),
|
_recentListEnabled: isRecentListEnabled(),
|
||||||
_room: state['features/base/conference'].room,
|
_room: state['features/base/conference'].room,
|
||||||
_settings: state['features/base/settings']
|
_settings: state['features/base/settings']
|
||||||
|
|
Loading…
Reference in New Issue