Announce service discovery - forbidden for non admin

I have a strange problem with ejabberd 2.0.5. A non-admin ACL user can't use Psi Service Discovery to send announcements.

I delegate announce capabilities to a specific user within each domain like this:

{host_config, "mailplus.wisctest.wisc.edu", [
    {acl, domainadmin, {user, "chatadmin", "mailplus.wisctest.wisc.edu"}} ] }.
...
{access, announce, [{allow, domainadmin}]}.
...
{mod_announce, [{access, announce}]},

When I login to chatadmin@mailplus.wisctest.wisc.edu with Psi I can successfully send an announcement by right clicking on the account header and going to Admin...

<message to="mailplus.wisctest.wisc.edu/announce/online" id="ab88a" >
<subject>test</subject>
<body>test</body>
<nick xmlns="http://jabber.org/protocol/nick">chatadmin</nick>
</message>

<message from="mailplus.wisctest.wisc.edu" xml:lang="en" to="chatadmin@mailplus.wisctest.wisc.edu/photon" id="ab88a" >
<subject>test</subject>
<body>test</body>
<nick xmlns="http://jabber.org/protocol/nick">chatadmin</nick>
</message>

But when I try to use Service Discovery, I see the Announcements item, and I see all of the announcement-related sub-items. But I can't send an announcement.

This is what shows up in the error console when I browse to "Send announcement to all online users"

<iq type="get" to="mailplus.wisctest.wisc.edu" id="ab81a" >
<query xmlns="http://jabber.org/protocol/disco#info" node="http://jabber.org/protocol/admin#announce" />
</iq>

<iq type="get" to="mailplus.wisctest.wisc.edu" id="ab82a" >
<query xmlns="http://jabber.org/protocol/disco#items" node="http://jabber.org/protocol/admin#announce" />
</iq>

<iq type="get" to="mailplus.wisctest.wisc.edu" id="ab83a" >
<query xmlns="http://jabber.org/protocol/disco#items" node="http://jabber.org/protocol/admin#announce" />
</iq>

<iq from="mailplus.wisctest.wisc.edu" type="error" to="chatadmin@mailplus.wisctest.wisc.edu/photon" id="ab81a" >
<query xmlns="http://jabber.org/protocol/disco#info" node="http://jabber.org/protocol/admin#announce" />
<error type="auth" code="403" >
<forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>

<iq from="mailplus.wisctest.wisc.edu" type="error" to="chatadmin@mailplus.wisctest.wisc.edu/photon" id="ab82a" >
<query xmlns="http://jabber.org/protocol/disco#items" node="http://jabber.org/protocol/admin#announce" />
<error type="auth" code="403" >
<forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>

<iq type="get" to="mailplus.wisctest.wisc.edu" id="ab84a" >
<item xmlns="jabber:iq:browse"/>
</iq>

<iq from="mailplus.wisctest.wisc.edu" type="error" to="chatadmin@mailplus.wisctest.wisc.edu/photon" id="ab83a" >
<query xmlns="http://jabber.org/protocol/disco#items" node="http://jabber.org/protocol/admin#announce" />
<error type="auth" code="403" >
<forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>

<iq type="get" to="mailplus.wisctest.wisc.edu" id="ab85a" >
<item xmlns="jabber:iq:browse"/>
</iq>

<iq from="mailplus.wisctest.wisc.edu" type="error" xml:lang="en" to="chatadmin@mailplus.wisctest.wisc.edu/photon" id="ab84a" >
<item xmlns="jabber:iq:browse"/>
<error type="cancel" code="501" >
<feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>

<iq type="get" to="mailplus.wisctest.wisc.edu" id="ab86a" >
<query xmlns="jabber:iq:agents"/>
</iq>

<iq from="mailplus.wisctest.wisc.edu" type="error" xml:lang="en" to="chatadmin@mailplus.wisctest.wisc.edu/photon" id="ab85a" >
<item xmlns="jabber:iq:browse"/>
<error type="cancel" code="501" >
<feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>

<iq type="get" to="mailplus.wisctest.wisc.edu" id="ab87a" >
<query xmlns="jabber:iq:agents"/>
</iq>

<iq from="mailplus.wisctest.wisc.edu" type="error" xml:lang="en" to="chatadmin@mailplus.wisctest.wisc.edu/photon" id="ab86a" >
<query xmlns="jabber:iq:agents"/>
<error type="cancel" code="501" >
<feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>

<iq from="mailplus.wisctest.wisc.edu" type="error" xml:lang="en" to="chatadmin@mailplus.wisctest.wisc.edu/photon" id="ab87a" >
<query xmlns="jabber:iq:agents"/>
<error type="cancel" code="501" >
<feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>

zjt wrote: I have a strange

zjt wrote:

I have a strange problem with ejabberd 2.0.5. A non-admin ACL user can't use Psi Service Discovery to send announcements.

It was a bug in ejabberd. I've fixed in 2.1.x branch of Git. You can apply the patch in your 2.0.5 code:
Indicate explicitly what nodes are handled by mod_configure

Syndicate content