aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_auth_anonymous.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-11-05 22:31:25 +0100
committerKim Alvefur <zash@zash.se>2020-11-05 22:31:25 +0100
commit238b2bfc1cdb65ae7d051c2f29c1427149317795 (patch)
tree58547de6e7795740633c1b93e67c217eb621fe8f /plugins/mod_auth_anonymous.lua
parentce3e3808f5359f481f3ea063220ba71428b26ad5 (diff)
parent48521ba1538f797f5bef64f5fe5f3a9fb6e68f7f (diff)
downloadprosody-238b2bfc1cdb65ae7d051c2f29c1427149317795.tar.gz
prosody-238b2bfc1cdb65ae7d051c2f29c1427149317795.zip
Merge 0.11->trunk
Diffstat (limited to 'plugins/mod_auth_anonymous.lua')
-rw-r--r--plugins/mod_auth_anonymous.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/mod_auth_anonymous.lua b/plugins/mod_auth_anonymous.lua
index 1f2bceb3..90646e71 100644
--- a/plugins/mod_auth_anonymous.lua
+++ b/plugins/mod_auth_anonymous.lua
@@ -11,6 +11,8 @@ local new_sasl = require "util.sasl".new;
local datamanager = require "util.datamanager";
local hosts = prosody.hosts;
+local allow_storage = module:get_option_boolean("allow_anonymous_storage", false);
+
-- define auth provider
local provider = {};
@@ -62,10 +64,14 @@ if not module:get_option_boolean("allow_anonymous_s2s", false) then
end
function module.load()
- datamanager.add_callback(dm_callback);
+ if not allow_storage then
+ datamanager.add_callback(dm_callback);
+ end
end
function module.unload()
- datamanager.remove_callback(dm_callback);
+ if not allow_storage then
+ datamanager.remove_callback(dm_callback);
+ end
end
module:provides("auth", provider);