[ejabberd] ACLs for PubSub publishing

Aurélien Bompard aurelien.bompard at c-s.fr
Thu Sep 10 18:22:16 MSD 2009


I finally found a way to allow everyone to publish to a node : it's the 
node that can be configured to do so. The setting is explained in the 
XEP-060 under the "configure node" section, but it boils down to sending 
something like

<iq type='set'
    from='nodeowner at example.com/resource'
    to='pubsub.example.com'
    id='config2'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
    <configure node='/home/example.com/nodeowner/publicnode'>
      <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#publish_model'><value>open</value></field>
      </x>
    </configure>
  </pubsub>
</iq>

Of course it would be better to have server-based ACLs to allow 
finer-grained permissions, but for now it'll do.

Thanks for your help, I hope it'll be useful to someone else.

Regards,
Aurélien

-- 
Aurélien Bompard
http://www.c-s.fr/LL_r168.html
Tél : +33 1 41 28 44 33



More information about the ejabberd mailing list