Add option to allow guest(moderators) to add a room password
This commit is contained in:
parent
103ae363f6
commit
f5ac18da18
@ -266,6 +266,9 @@ 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,
|
||||||
|
|
||||||
// Message to show the users. Example: 'The service will be down for
|
// Message to show the users. Example: 'The service will be down for
|
||||||
// maintenance at 01:00 AM GMT,
|
// maintenance at 01:00 AM GMT,
|
||||||
// noticeMessage: '',
|
// noticeMessage: '',
|
||||||
|
|||||||
@ -266,9 +266,12 @@ function _getAllParticipants(stateful) {
|
|||||||
*
|
*
|
||||||
* @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(stateful: Object | Function) {
|
export function isLocalParticipantModerator(
|
||||||
|
stateful: Object | Function,
|
||||||
|
ignoreToken: ?boolean = false) {
|
||||||
const state = toState(stateful);
|
const state = toState(stateful);
|
||||||
const localParticipant = getLocalParticipant(state);
|
const localParticipant = getLocalParticipant(state);
|
||||||
|
|
||||||
@ -278,7 +281,8 @@ export function isLocalParticipantModerator(stateful: Object | Function) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
localParticipant.role === PARTICIPANT_ROLE.MODERATOR
|
localParticipant.role === PARTICIPANT_ROLE.MODERATOR
|
||||||
&& (!state['features/base/config'].enableUserRolesBasedOnToken
|
&& (ignoreToken
|
||||||
|
|| !state['features/base/config'].enableUserRolesBasedOnToken
|
||||||
|| !state['features/base/jwt'].isGuest));
|
|| !state['features/base/jwt'].isGuest));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -588,7 +588,7 @@ function _mapStateToProps(state) {
|
|||||||
} = state['features/base/conference'];
|
} = state['features/base/conference'];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_canEditPassword: isLocalParticipantModerator(state),
|
_canEditPassword: isLocalParticipantModerator(state, state['features/base/config'].lockRoomGuestEnabled),
|
||||||
_conference: conference,
|
_conference: conference,
|
||||||
_conferenceName: room,
|
_conferenceName: room,
|
||||||
_inviteURL: getInviteURL(state),
|
_inviteURL: getInviteURL(state),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user