I'm experimenting with mod_pubsub on ejabberd-2.0 rc1 (OS X; I used the binary installer). I would like for one "superuser" to be able to create pubsub nodes on behalf of other users, but so far I have not had much luck. I understand that the pubsub node hierarchy must start with "/home/[server name]", and have successfully created nodes of the form "/home/[server name]/[logged-in user's name]".
But what I'd like to do is have one user, say
<iq type="set" from="romeo@shakespeare.lit/Psi" to="pubsub.shakespeare.lit" id="create1">
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<create node='/home/shakespeare.lit/juliet'/>
<configure>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE' type='hidden'>
<value>http://jabber.org/protocol/pubsub#node_config</value>
</field>
<field var='pubsub#access_model'><value>whitelist</value></field>
</x>
</configure>
</pubsub>
</iq>
If that worked, I would then configure the node to add
But the reply I get when I try this is:
<iq from="pubsub.shakespeare.lit" type="error" xml:lang="en" to="romeo@shakespeare.lit/Psi" id="create1" >
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<create node="/home/shakespeare.lit/juliet" />
<configure>
<x xmlns="jabber:x:data" type="submit" >
<field type="hidden" var="FORM_TYPE" >
<value>http://jabber.org/protocol/pubsub#node_config</value>
</field>
<field var="pubsub#access_model" >
<value>whitelist</value>
</field>
</x>
</configure>
</pubsub>
<error type="auth" code="403" >
<forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>
This certainly looks like an access control problem. But it doesn't even work when romeo is an admin user. What am I doing wrong?
Thanks,
-Mike
Seems not possible
It seems that the mod_pubsub option access_createnode allowsromeo@shakespeare.lit to create nodes in /home/shakespeare.lit/romeo
However, it is not allowed (and there isn't any option to allow) romeo to create nodes in /home/shakespeare.lit/juliet