def METHOD_NAME(
    self, user_id: str, room_id: str, aliases: Collection[str]
) -> bool:
    """Checks if the given user is allowed to publish the room
    Args:
        user_id: The user ID publishing the room.
        room_id: The room being published.
        aliases: any local aliases associated with the room
    Returns:
        True if user can publish room
    """
    for rule in self._room_list_publication_rules:
        if rule.matches(user_id, room_id, aliases):
            return rule.action == "allow"
    return False