private boolean isAllowedToCreate(final JID jid) {
        // If room creation is not restricted, everyone is allowed to create a room.
        if (!isRoomCreationRestricted()) {
            return true;
        }

        final JID bareJID = jid.asBareJID();

        // System administrators are always allowed to create rooms.
        if (sysadmins.includes(bareJID)) {
            return true;
        }

        // If the JID of the user has explicitly been given permission, room creation is allowed.
        if (allowedToCreate.includes(bareJID)) {
            return true;
        }

        // Verify the policy that allows all local, registered users to create rooms.
        return allRegisteredUsersAllowedToCreate && UserManager.getInstance().isRegisteredUser(bareJID, false);
    }
Checks if a particular JID is allowed to create rooms.

@param jid The jid for which to check (cannot be null).
@return true if the JID is allowed to create a room, otherwise false.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MultiUserChatServiceImpl.java