1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-10-30 23:23:02 +00:00

Do the right thing when we have a username but no password

With a username parameter but no password parameter we'll attribute edits to that username, but not require authentication.
This commit is contained in:
Jermolene
2018-06-26 15:40:29 +01:00
parent 501d0a8edc
commit bdb68fea6d
2 changed files with 4 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ exports.path = /^\/status$/;
exports.handler = function(request,response,state) {
response.writeHead(200, {"Content-Type": "application/json"});
var text = JSON.stringify({
username: state.authenticatedUsername,
username: state.authenticatedUsername || state.server.get("username") || "",
space: {
recipe: "default"
},