[ejabberd] Patch for nodetree filtering/authorization in mod_pubsub

Brian Cully bcully at gmail.com
Fri Nov 21 00:21:19 MSK 2008


	In one of the applications I'm writing, I'd like to filter pubsub  
node discovery and queries based on some authorization of the JID of  
the requester. This is not currently possible in ejabberd due to  
gen_pubsub_nodetree not supplying enough parameters to Module:get_node  
or Module:get_nodes. Module:get_subnodes does pass in the requesting  
JID, but that doesn't appear to patch all the possible requests.

	This patch adds two more functions: get_node/3 and get_nodes/2. When  
those functions are called, the requesting JID is passed in as the  
final argument. Using these functions I can write my own nodetree  
plugin that authorizes the requests.

	I'm assuming this is generally useful to the ejabberd community, and  
would like them integrated into the tree, or comments/suggestions as  
to why it shouldn't be in the main ejabberd tree.

	The patch is on gist: https://gist.github.com/96b4d5e6f9c6ed8981db

-bjc


More information about the ejabberd mailing list