|
|
@@ -5,10 +5,7 @@ import { connect } from 'react-redux';
|
|
5
|
5
|
import { setPassword } from '../../../base/conference';
|
|
6
|
6
|
import { getInviteURL } from '../../../base/connection';
|
|
7
|
7
|
import { translate } from '../../../base/i18n';
|
|
8
|
|
-import {
|
|
9
|
|
- PARTICIPANT_ROLE,
|
|
10
|
|
- getLocalParticipant
|
|
11
|
|
-} from '../../../base/participants';
|
|
|
8
|
+import { isLocalParticipantModerator } from '../../../base/participants';
|
|
12
|
9
|
|
|
13
|
10
|
import DialInNumber from './DialInNumber';
|
|
14
|
11
|
import PasswordForm from './PasswordForm';
|
|
|
@@ -553,18 +550,9 @@ function _mapStateToProps(state) {
|
|
553
|
550
|
password,
|
|
554
|
551
|
room
|
|
555
|
552
|
} = state['features/base/conference'];
|
|
556
|
|
- const isModerator
|
|
557
|
|
- = getLocalParticipant(state).role === PARTICIPANT_ROLE.MODERATOR;
|
|
558
|
|
- let canEditPassword;
|
|
559
|
|
-
|
|
560
|
|
- if (state['features/base/config'].enableUserRolesBasedOnToken) {
|
|
561
|
|
- canEditPassword = isModerator && !state['features/base/jwt'].isGuest;
|
|
562
|
|
- } else {
|
|
563
|
|
- canEditPassword = isModerator;
|
|
564
|
|
- }
|
|
565
|
553
|
|
|
566
|
554
|
return {
|
|
567
|
|
- _canEditPassword: canEditPassword,
|
|
|
555
|
+ _canEditPassword: isLocalParticipantModerator(state),
|
|
568
|
556
|
_conference: conference,
|
|
569
|
557
|
_conferenceName: room,
|
|
570
|
558
|
_inviteURL: getInviteURL(state),
|