mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 06:37:10 -04:00
Now working. The password can be set from within the pad editor.
Currently there are only two remaining issues: 1 After the password is set, re-authentication is needed 2 The toolbar button does not yet have a nice icon
This commit is contained in:
parent
c905fd76c1
commit
a161b59601
8 changed files with 56 additions and 49 deletions
|
@ -190,6 +190,12 @@ exports.handleMessage = function(client, message)
|
|||
{
|
||||
handleSuggestUserName(client, message);
|
||||
}
|
||||
else if(message.type == "COLLABROOM" &&
|
||||
message.data.type == "CLIENT_MESSAGE" &&
|
||||
message.data.payload.type == "setPassword")
|
||||
{
|
||||
handleSetPadPassword(client, message);
|
||||
}
|
||||
//if the message type is unkown, throw an exception
|
||||
else
|
||||
{
|
||||
|
@ -294,6 +300,13 @@ function handleSuggestUserName(client, message)
|
|||
}
|
||||
}
|
||||
|
||||
function handleSetPadPassword(client, message){
|
||||
var padId = session2pad[client.id];
|
||||
padManager.getPad(padId, function(err, value){
|
||||
value.setPassword(message.data.payload.password);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles a USERINFO_UPDATE, that means that a user have changed his color or name. Anyway, we get both informations
|
||||
* @param client the client that send this message
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue