other bits required for read only

This commit is contained in:
John McLear 2015-05-19 16:57:53 +01:00
parent 41d24a8c8f
commit 818408cf49
2 changed files with 9 additions and 4 deletions

View file

@ -33,13 +33,18 @@ exports.expressCreateServer = function (hook_name, args, cb) {
//serve pad.html under /p
args.app.get('/p/:pad', function(req, res, next)
{
// The below might break for pads being rewritten
var isReadOnly = req.url.indexOf("/p/r.") === 0;
hooks.callAll("padInitToolbar", {
toolbar: toolbar
toolbar: toolbar,
isReadOnly: isReadOnly
});
res.send(eejs.require("ep_etherpad-lite/templates/pad.html", {
req: req,
toolbar: toolbar
toolbar: toolbar,
isReadOnly: isReadOnly
}));
});