[ejabberd] pubsub god-mode

Christophe Romain cromain at process-one.net
Mon Mar 10 14:12:51 MSK 2008


Hi,

> is it possible to create an ACL in 2.0.0 that allows a specific JID
> to update my PEP/PIP nodes?

by now, the only ACL usable in pubsub is access_createnode
it allows do deny some users to create nodes.
yes, it's possible to also add an acl for passing to publish_item  
function.

ACL is fetched from the configuration in init function. you can add  
here an access_publishitem acl.
see iq_pubsub function, it passes Access parameter to create_node.
Here it can handle Access as a proplists, and pass access_createnode  
to create_node function, and access_publishitem to publish_item  
function.

finally, in create_node function you see that the acl match is done  
by the create_node_permission plugin's function.
you should do the same with the publish_item, creating a  
publish_item_permission function in the plugin.


More information about the ejabberd mailing list