1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-09-13 08:16:05 +00:00

Fix two code typos

This commit is contained in:
Jermolene
2018-06-27 11:08:09 +01:00
parent adfd65dae2
commit 620116a0b4
2 changed files with 2 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ exports.handler = function(request,response,state) {
response.writeHead(200, {"Content-Type": "application/json"});
var text = JSON.stringify({
username: state.authenticatedUsername || state.server.get("username") || "",
read_only: !state.server.isAuthorized("writers"),
read_only: !state.server.isAuthorized("writers",state.authenticatedUsername),
space: {
recipe: "default"
},

View File

@@ -158,7 +158,7 @@ Server.prototype.requestHandler = function(request,response) {
return;
}
// 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.end();
return;