#1489 Virtual host admins can't create MUC rooms, when room creation is restricted.

Reporter onefang
Owner Nobody
Created
Updated
Stars ★ (1)
Tags
  • Priority-Medium
  • Type-Defect
  • Status-Invalid
  1. onefang on

    What steps will reproduce the problem? 1. Create a virtual host. 2. Add an admin to that virtual host that is not a global admin. 3. Add a muc component to that virtual host. 4. set restrict_room_creation = "admin", or "true" in that component. 5. Restart prosody. 6. Try to create a MUC room for that virtual host, as that admin. What is the expected output? Room is created successfully. What do you see instead? Room isn't created. What version of the product are you using? On what operating system? 0.11.4-1~stretch2 from the prosody.im package repo. Running under Devuan ASCII. Please provide any additional information below. The global admins can create MUC rooms in any virtual host, as expected. Virtual host specific admins in their own virtual host cannot.

  2. onefang on

    I have figured out what's going wrong. You have to specify the admins setting for the Component, not the VirtualHost. Since the Component host name has to be different from the VirtualHost host name, and mod_muc uses the Component host name in the call to is_admin(). So is_admin checks for admins settings in the Component, doesn't find them if the setting is only in the VirtualHost section before the Component, it doesn't find the admins setting and falls back to the global admins setting. The documentation says that admins is a setting for VirtualHosts, not Components. The documentation for Components doesn't mention admins. The documentation for the admins setting says "Each host can have a different set of admins (simply put the option into the correct host’s section).", so that's hosts, not components. I dunno if this is the way it is supposed to work, but I think either the code or the docs need to be fixed.

  3. Zash on

    Hi, thanks for the report As you figured out, Compontents and VirtualHost are both hosts. They differ primarily in whether user related things are enabled and the default set of modules loaded. They live in a flat namespace and they generally don't inherit any settings from each other, only from the global section. I think this is mostly a documentation issue. If you have any specific suggestions for text changes feel free to open a documentation issue or send a patch for the https://hg.prosody.im/site/ repo.

    Changes
    • tags Status-Invalid

New comment

Not published. Used for spam prevention and optional update notifications.