Auto-authorize new members on public networks properly.

This commit is contained in:
Adam Ierymenko 2016-12-22 18:52:34 -08:00
parent c8554504f3
commit bf2b9e3692

View File

@ -1287,7 +1287,8 @@ void EmbeddedNetworkController::_request(
authorizedBy = "memberIsAuthorized";
} else if (!_jB(network["private"],true)) {
authorizedBy = "networkIsPublic";
if (!member.count("authorized"))
json &ahist = member["authHistory"];
if ((!ahist.is_array())||(ahist.size() == 0))
autoAuthorized = true;
} else {
char presentedAuth[512];