Software /
code /
prosody
Comparison
util/pubsub.lua @ 9106:e70b9e8bc443
util.pubsub: Use service.node_defaults in case config.node_defaults was not provided (thanks jonasw)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 04 Aug 2018 21:30:10 +0100 |
parent | 9104:e1ca373a7e09 |
child | 9107:6e42ef9c805c |
comparison
equal
deleted
inserted
replaced
9105:e735c9865f42 | 9106:e70b9e8bc443 |
---|---|
112 end | 112 end |
113 | 113 |
114 function service:get_default_affiliation(node, actor, action) -- luacheck: ignore 212 | 114 function service:get_default_affiliation(node, actor, action) -- luacheck: ignore 212 |
115 local node_obj = self.nodes[node]; | 115 local node_obj = self.nodes[node]; |
116 local access_model = node_obj and node_obj.config.access_model | 116 local access_model = node_obj and node_obj.config.access_model |
117 or self.config.node_defaults.access_model; | 117 or self.node_defaults.access_model; |
118 | 118 |
119 if access_model == "open" then | 119 if access_model == "open" then |
120 return "none"; | 120 return "none"; |
121 elseif access_model == "whitelist" then | 121 elseif access_model == "whitelist" then |
122 return "restricted"; | 122 return "restricted"; |