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:
@@ -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"
|
||||
},
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user