mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
Show a read only link on the pad
This commit is contained in:
parent
7915390b83
commit
1c1e035bf1
5 changed files with 111 additions and 7 deletions
|
@ -23,6 +23,7 @@ var padManager = require("./PadManager");
|
|||
var Changeset = require("./Changeset");
|
||||
var AttributePoolFactory = require("./AttributePoolFactory");
|
||||
var authorManager = require("./AuthorManager");
|
||||
var readOnlyManager = require("./ReadOnlyManager");
|
||||
|
||||
/**
|
||||
* A associative array that translates a session to a pad
|
||||
|
@ -507,6 +508,7 @@ function handleClientReady(client, message)
|
|||
var authorColorId;
|
||||
var pad;
|
||||
var historicalAuthorData = {};
|
||||
var readOnlyId;
|
||||
|
||||
async.series([
|
||||
//get all authordata of this new user
|
||||
|
@ -543,6 +545,14 @@ function handleClientReady(client, message)
|
|||
pad = value;
|
||||
callback(err);
|
||||
});
|
||||
},
|
||||
function(callback)
|
||||
{
|
||||
readOnlyManager.getReadOnlyId(message.padId, function(err, value)
|
||||
{
|
||||
readOnlyId = value;
|
||||
callback(err);
|
||||
});
|
||||
}
|
||||
], callback);
|
||||
});
|
||||
|
@ -627,6 +637,7 @@ function handleClientReady(client, message)
|
|||
},
|
||||
"numConnectedUsers": pad2sessions[message.padId].length,
|
||||
"isProPad": false,
|
||||
"readOnlyId": readOnlyId,
|
||||
"serverTimestamp": new Date().getTime(),
|
||||
"globalPadId": message.padId,
|
||||
"userId": author,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue