mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 16:36:15 -04:00
Simplify read-only pad ID checks
This commit is contained in:
parent
f63610bb12
commit
329d037431
2 changed files with 3 additions and 4 deletions
|
@ -46,8 +46,7 @@ exports.expressCreateServer = (hookName, args, cb) => {
|
|||
// serve pad.html under /p
|
||||
args.app.get('/p/:pad', (req, res, next) => {
|
||||
// The below might break for pads being rewritten
|
||||
const isReadOnly =
|
||||
req.url.indexOf('/p/r.') === 0 || !webaccess.userCanModify(req.params.pad, req);
|
||||
const isReadOnly = !webaccess.userCanModify(req.params.pad, req);
|
||||
|
||||
hooks.callAll('padInitToolbar', {
|
||||
toolbar,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue