feat: Drop lockRoomGuestEnabled.
This commit is contained in:
parent
4b8aae90e0
commit
c4ba97e87c
|
@ -370,9 +370,6 @@ var config = {
|
||||||
// Whether or not some features are checked based on token.
|
// Whether or not some features are checked based on token.
|
||||||
// enableFeaturesBasedOnToken: false,
|
// 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
|
// When enabled the password used for locking a room is restricted to up to the number of digits specified
|
||||||
// roomPasswordNumberOfDigits: 10,
|
// roomPasswordNumberOfDigits: 10,
|
||||||
// default: roomPasswordNumberOfDigits: false,
|
// default: roomPasswordNumberOfDigits: false,
|
||||||
|
|
|
@ -298,12 +298,9 @@ export function isIconUrl(icon: ?string | ?Object) {
|
||||||
*
|
*
|
||||||
* @param {Object|Function} stateful - Object or function that can be resolved
|
* @param {Object|Function} stateful - Object or function that can be resolved
|
||||||
* to the Redux state.
|
* to the Redux state.
|
||||||
* @param {?boolean} ignoreToken - When true we ignore the token check.
|
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
export function isLocalParticipantModerator(
|
export function isLocalParticipantModerator(stateful: Object | Function) {
|
||||||
stateful: Object | Function,
|
|
||||||
ignoreToken: ?boolean = false) {
|
|
||||||
const state = toState(stateful);
|
const state = toState(stateful);
|
||||||
const localParticipant = getLocalParticipant(state);
|
const localParticipant = getLocalParticipant(state);
|
||||||
|
|
||||||
|
@ -313,9 +310,8 @@ export function isLocalParticipantModerator(
|
||||||
|
|
||||||
return (
|
return (
|
||||||
localParticipant.role === PARTICIPANT_ROLE.MODERATOR
|
localParticipant.role === PARTICIPANT_ROLE.MODERATOR
|
||||||
&& (ignoreToken
|
&& (!state['features/base/config'].enableUserRolesBasedOnToken
|
||||||
|| !state['features/base/config'].enableUserRolesBasedOnToken
|
|| !state['features/base/jwt'].isGuest));
|
||||||
|| !state['features/base/jwt'].isGuest));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -125,13 +125,10 @@ function mapStateToProps(state) {
|
||||||
locked,
|
locked,
|
||||||
password
|
password
|
||||||
} = state['features/base/conference'];
|
} = state['features/base/conference'];
|
||||||
const {
|
const { roomPasswordNumberOfDigits } = state['features/base/config'];
|
||||||
lockRoomGuestEnabled,
|
|
||||||
roomPasswordNumberOfDigits
|
|
||||||
} = state['features/base/config'];
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_canEditPassword: isLocalParticipantModerator(state, lockRoomGuestEnabled),
|
_canEditPassword: isLocalParticipantModerator(state),
|
||||||
_conference: conference,
|
_conference: conference,
|
||||||
_dialIn: state['features/invite'],
|
_dialIn: state['features/invite'],
|
||||||
_locked: locked,
|
_locked: locked,
|
||||||
|
|
Loading…
Reference in New Issue