mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-10-22 11:17:39 +00:00
Fix two code typos
This commit is contained in:
@@ -20,7 +20,7 @@ exports.handler = function(request,response,state) {
|
|||||||
response.writeHead(200, {"Content-Type": "application/json"});
|
response.writeHead(200, {"Content-Type": "application/json"});
|
||||||
var text = JSON.stringify({
|
var text = JSON.stringify({
|
||||||
username: state.authenticatedUsername || state.server.get("username") || "",
|
username: state.authenticatedUsername || state.server.get("username") || "",
|
||||||
read_only: !state.server.isAuthorized("writers"),
|
read_only: !state.server.isAuthorized("writers",state.authenticatedUsername),
|
||||||
space: {
|
space: {
|
||||||
recipe: "default"
|
recipe: "default"
|
||||||
},
|
},
|
||||||
|
@@ -158,7 +158,7 @@ Server.prototype.requestHandler = function(request,response) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Authorize with the authenticated username
|
// Authorize with the authenticated username
|
||||||
if(this.isAuthorized(authorizationType,state.authenticatedUsername)) {
|
if(!this.isAuthorized(authorizationType,state.authenticatedUsername)) {
|
||||||
response.writeHead(401,"'" + state.authenticatedUsername + "' is not authorized to access '" + this.servername + "'");
|
response.writeHead(401,"'" + state.authenticatedUsername + "' is not authorized to access '" + this.servername + "'");
|
||||||
response.end();
|
response.end();
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user