Comparison

util/pubsub.lua @ 3917:263a133bdf5a

util.pubsub: Fix nil global access in get_nodes()
author Matthew Wild <mwild1@gmail.com>
date Tue, 21 Dec 2010 04:17:24 +0000
parent 3910:80fe910f912a
child 3928:4dfb345e33ec
comparison
equal deleted inserted replaced
3916:ffe5a0d36f57 3917:263a133bdf5a
233 end 233 end
234 end 234 end
235 235
236 function service:get_nodes(actor) 236 function service:get_nodes(actor)
237 -- Access checking 237 -- Access checking
238 if not self:may(node, actor, "get_nodes") then 238 if not self:may(nil, actor, "get_nodes") then
239 return false, "forbidden"; 239 return false, "forbidden";
240 end 240 end
241 -- 241 --
242 return true, self.nodes; 242 return true, self.nodes;
243 end 243 end