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.
|
||||
// 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,
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue