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