mod_pubsub_post: Start with actor unset
This should make it easier to add actor models in future commits without
defaulting to the superuser by default.
--- a/mod_pubsub_post/mod_pubsub_post.lua Tue Aug 21 17:18:31 2018 +0100
+++ b/mod_pubsub_post/mod_pubsub_post.lua Fri Aug 24 14:48:59 2018 +0200
@@ -74,11 +74,13 @@
module:log("debug", "Handling POST: \n%s\n", tostring(request.body));
local content_type = request.headers.content_type or "application/octet-stream";
- local actor = true;
+ local actor;
if actor_source == "request.ip" then
actor = request.ip or request.conn:ip();
- elseif actor_source ~= "superuser" then
+ elseif actor_source == "superuser" then
+ actor = true;
+ else
module:log("error", "pubsub_post_actor set to unsupported value %q", actor_source);
return 500;
end