feat: Drop lockRoomGuestEnabled.

This commit is contained in:
damencho 2020-11-05 12:23:49 -06:00 committed by Дамян Минков
parent 4b8aae90e0
commit c4ba97e87c
3 changed files with 5 additions and 15 deletions

View File

@ -370,9 +370,6 @@ var config = {
// Whether or not some features are checked based on token.
// enableFeaturesBasedOnToken: false,
// Enable lock room for all moderators, even when userRolesBasedOnToken is enabled and participants are guests.
// lockRoomGuestEnabled: false,
// When enabled the password used for locking a room is restricted to up to the number of digits specified
// roomPasswordNumberOfDigits: 10,
// default: roomPasswordNumberOfDigits: false,

View File

@ -298,12 +298,9 @@ export function isIconUrl(icon: ?string | ?Object) {
*
* @param {Object|Function} stateful - Object or function that can be resolved
* to the Redux state.
* @param {?boolean} ignoreToken - When true we ignore the token check.
* @returns {boolean}
*/
export function isLocalParticipantModerator(
stateful: Object | Function,
ignoreToken: ?boolean = false) {
export function isLocalParticipantModerator(stateful: Object | Function) {
const state = toState(stateful);
const localParticipant = getLocalParticipant(state);
@ -313,9 +310,8 @@ export function isLocalParticipantModerator(
return (
localParticipant.role === PARTICIPANT_ROLE.MODERATOR
&& (ignoreToken
|| !state['features/base/config'].enableUserRolesBasedOnToken
|| !state['features/base/jwt'].isGuest));
&& (!state['features/base/config'].enableUserRolesBasedOnToken
|| !state['features/base/jwt'].isGuest));
}
/**

View File

@ -125,13 +125,10 @@ function mapStateToProps(state) {
locked,
password
} = state['features/base/conference'];
const {
lockRoomGuestEnabled,
roomPasswordNumberOfDigits
} = state['features/base/config'];
const { roomPasswordNumberOfDigits } = state['features/base/config'];
return {
_canEditPassword: isLocalParticipantModerator(state, lockRoomGuestEnabled),
_canEditPassword: isLocalParticipantModerator(state),
_conference: conference,
_dialIn: state['features/invite'],
_locked: locked,