mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 06:03:34 +01:00
AuthorManager: prevent generation of an author in case no token was specified
This commit is contained in:
parent
32806c31fd
commit
dbfe5cadf4
1 changed files with 4 additions and 0 deletions
|
@ -107,6 +107,10 @@ exports.doesAuthorExists = exports.doesAuthorExist;
|
|||
* @param {String} token The token
|
||||
*/
|
||||
exports.getAuthor4Token = async (token) => {
|
||||
// e.g. in case of an export of a public pad, a token is not needed
|
||||
if (token == null) {
|
||||
return;
|
||||
}
|
||||
const author = await mapAuthorWithDBKey('token2author', token);
|
||||
|
||||
// return only the sub value authorID
|
||||
|
|
Loading…
Reference in a new issue