Browse Source

Merge pull request #499 from isymchych/fix-auth-dialog

fix authentication dialog
j8
Paweł Domas 9 years ago
parent
commit
61b28fccf2
2 changed files with 10 additions and 5 deletions
  1. 2
    1
      conference.js
  2. 8
    4
      modules/UI/authentication/AuthHandler.js

+ 2
- 1
conference.js View File

193
             }, 5000);
193
             }, 5000);
194
 
194
 
195
             // notify user that auth is required
195
             // notify user that auth is required
196
-            AuthHandler.requireAuth(APP.conference.roomName);
196
+
197
+            AuthHandler.requireAuth(room, roomLocker.password);
197
             break;
198
             break;
198
 
199
 
199
         case ConferenceErrors.RESERVATION_ERROR:
200
         case ConferenceErrors.RESERVATION_ERROR:

+ 8
- 4
modules/UI/authentication/AuthHandler.js View File

54
         // 4. reallocate focus in current room
54
         // 4. reallocate focus in current room
55
         openConnection({id, password}).then(function (connection) {
55
         openConnection({id, password}).then(function (connection) {
56
             // open room
56
             // open room
57
-            let newRoom = connection.initJitsiConference(room.getName());
57
+            let newRoom = connection.initJitsiConference(
58
+                room.getName(), APP.conference._getConferenceOptions()
59
+            );
58
 
60
 
59
             loginDialog.displayConnectionStatus(
61
             loginDialog.displayConnectionStatus(
60
                 APP.translation.translateString('connection.FETCH_SESSION_ID')
62
                 APP.translation.translateString('connection.FETCH_SESSION_ID')
105
     if (room.isExternalAuthEnabled()) {
107
     if (room.isExternalAuthEnabled()) {
106
         doExternalAuth(room, lockPassword);
108
         doExternalAuth(room, lockPassword);
107
     } else {
109
     } else {
108
-        doXmppAuth();
110
+        doXmppAuth(room, lockPassword);
109
     }
111
     }
110
 }
112
 }
111
 
113
 
112
 /**
114
 /**
113
  * Notify user that authentication is required to create the conference.
115
  * Notify user that authentication is required to create the conference.
116
+ * @param {JitsiConference} room
117
+ * @param {string} [lockPassword] password to use if the conference is locked
114
  */
118
  */
115
-function requireAuth(roomName) {
119
+function requireAuth(room, lockPassword) {
116
     if (authRequiredDialog) {
120
     if (authRequiredDialog) {
117
         return;
121
         return;
118
     }
122
     }
119
 
123
 
120
     authRequiredDialog = LoginDialog.showAuthRequiredDialog(
124
     authRequiredDialog = LoginDialog.showAuthRequiredDialog(
121
-        roomName, authenticate
125
+        room.getName(), authenticate.bind(null, room, lockPassword)
122
     );
126
     );
123
 }
127
 }
124
 
128
 

Loading…
Cancel
Save