diff options
author | webzwo0i <webzwo0i@c3d2.de> | 2015-03-03 16:39:14 +0100 |
---|---|---|
committer | webzwo0i <webzwo0i@c3d2.de> | 2015-03-03 16:39:14 +0100 |
commit | f249b42ab43c45f255c098c0a9cc904e43b0305a (patch) | |
tree | fcdbc6566f9dbe359293fe0d07b028772a5835b5 /src/node/handler/PadMessageHandler.js | |
parent | 393a4e54e5517624f07299a436e623a34f8104e2 (diff) | |
download | etherpad-lite-f249b42ab43c45f255c098c0a9cc904e43b0305a.zip |
empty author should be allowed to support clearAuthorship functionality
Diffstat (limited to 'src/node/handler/PadMessageHandler.js')
-rw-r--r-- | src/node/handler/PadMessageHandler.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index ab81ad87..ef8e32b0 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -665,7 +665,8 @@ function handleUserChanges(data, cb) if(!attr) return attr = wireApool.getAttrib(attr) if(!attr) return - if('author' == attr[0] && attr[1] != thisSession.author) throw new Error("Trying to submit changes as another author in changeset "+changeset); + //the empty author is used in the clearAuthorship functionality so this should be the only exception + if('author' == attr[0] && (attr[1] != thisSession.author && attr[1] != '')) throw new Error("Trying to submit changes as another author in changeset "+changeset); }) } |