how to get the member list of a members-only MUC

hi,

according to XEP-0045(section 9.5), room admin is able to request the member list of a members-only MUC. But is it also possible for the ejabberd admin to do this, without actually logging into any user account?

With the default configuration, error code 403 is returned. How could I configure to make this work, or should I add the ejabberd admin to the room admins as well? mod_muc_admin provides the method get_room_occupants, but seems to retrieve the online members only.

any help will much appreciated!
cai

caili wrote: is it also

caili wrote:

is it also possible for the ejabberd admin to do this, without actually logging into any user account?

Umm, without logging? It is required to login in ejabberd with the Jabber account that has admin privilege, and then send the query IQ.

caili wrote:

How could I configure to make this work, or should I add the ejabberd admin to the room admins as well?

This configuration makes joe@localhost a "MUC service administrator":

 
{acl, admin, {user, "joe", "localhost"}}.

{access, muc_admin, [{allow, admin}]}.

{modules, [
  {mod_muc, [
             {access_admin, muc_admin},
 ...
 ]}.

Then I login to the account joe@localhost and I send this stanza:

 
<iq 	type='get'
	to='aa@conference.localhost'>
  <query xmlns='http://jabber.org/protocol/muc#admin'>
    <item affiliation='member'/>
  <query>
<iq>

And I receive the list of members correctly:

 
<iq from='aa@conference.localhost'
	to='joe@localhost/work'
	type='result'>
  <query xmlns='http://jabber.org/protocol/muc#admin'>
    <item affiliation='member'
	jid='badlop2@localhost'>
      <reason/>
    <item>
    <item affiliation='member'
	jid='badlop3@localhost'>
      <reason/>
    <item>
  <query>
<iq>

thanks for the reply. It

Hi badlop, thanks for the reply.

It works in the case that the MUC was created in-band. Since I'm managing the MUCs by mod_muc_admin over mod_rest:

(ejabberdctl) create_room abc conference.localhost localhost
<iq from='admin@localhost' to='abc@conference.localhost' type='get'>
  <query xmlns='http://jabber.org/protocol/muc#admin'>
     <item affiliation='member'/>
  </query>
</iq>
<iq type="error" to="admin@localhost/27478666621279420237346182" from="abc@conference.localhost">
  <query xmlns="http://jabber.org/protocol/muc#admin">
    <item affiliation="member"/>
  </query>
  <error code="403" type="auth">
    <forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
    <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">Administrator privileges required</text>
  </error>
</iq>

It seems not to work until I set the affiliation to 'owner' manually, right after creating of the room:

(ejabberdctl) set_room_affiliation abc conference.localhost admin@localhost owner

Is there any further configuration options to make this work without setting the ownership manually for every MUC?
Furthermore, is it possible to allow admin login from given IPs only?

Umm

caili wrote:

Is there any further configuration options to make this work without setting the ownership manually for every MUC?

Not that I'm aware.

caili wrote:

Furthermore, is it possible to allow admin login from given IPs only?

Not possible I think.

ok, thanks

ok, thanks

Syndicate content