| 578 | |
| 579 | |
| 580 | int LuaHTTPMgr::TestAccess(lua_State* L) { |
| 581 | const std::string hostname = luaL_checkstring(L, 1); |
| 582 | if ((accessList == NULL) || accessList->alwaysAuthorized()) { |
| 583 | lua_pushboolean(L, 1); |
| 584 | } |
| 585 | else { |
| 586 | std::vector<std::string> hostnames; |
| 587 | hostnames.push_back(hostname); |
| 588 | lua_pushboolean(L, accessList->authorized(hostnames)); |
| 589 | } |
| 590 | return 1; |
| 591 | } |
| 592 | |
| 593 | |
| 594 | //============================================================================// |
nothing calls this directly
no test coverage detected