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

Add support for requiring authentication without restricting the username

This commit is contained in:
Jermolene
2018-06-27 09:47:20 +01:00
parent 8a91c07fa9
commit 3d77f18734

View File

@@ -150,7 +150,7 @@ Server.prototype.requestHandler = function(request,response) {
return; return;
} }
// Authorize with the authenticated username // Authorize with the authenticated username
if(principals.indexOf(state.authenticatedUsername) === -1) { if(principals.indexOf(state.authenticatedUsername) === -1 && principals.indexOf("(authenticated)") === -1) {
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;