Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1miZwk-0004rN-FW for pgsql-www@arkaria.postgresql.org; Thu, 04 Nov 2021 10:26:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1miZwj-0000Iu-CB for pgsql-www@arkaria.postgresql.org; Thu, 04 Nov 2021 10:26:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1miZwj-0000Il-60 for pgsql-www@lists.postgresql.org; Thu, 04 Nov 2021 10:26:13 +0000 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1miZwg-0002hh-Kd for pgsql-www@lists.postgresql.org; Thu, 04 Nov 2021 10:26:12 +0000 Received: by mail-lj1-x229.google.com with SMTP id d23so8629226ljj.10 for ; Thu, 04 Nov 2021 03:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hagander-net.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=n9E4T/xop5F5qTyentEmXPNVArmnmPZs/r4EJlnP/Qk=; b=kPrXMNO49b4EiWQoj6OfNt4MB+JHMKV7cu8Q42d/eR9ZdEkGXmwzl4mTmLA5TRFfRe U6lIVznANO+AfOaJz9m0ka9vHWspwm5GYX8dRQNpJDrCwcI1vFM3WIMmgdr5W7Bf3YQc F6TqKvuzoJX9cmB14Y4V5ga3flrs7THVMDYunr8yzFMMFS8dxMdjpsj6XsxXgx37zexA /tbMWNVFdnK5LMu6QGdNwsz3hJHNFEKBmNnOOU5rFZl5+ojY1Q7Yld7cNdo2EVub3cSo be5Iypjc8GHVGOSwxsMBpq+ZS6GhRJbkrgQf+KQ+5ZoVJWDwKw8c/zg9CtanH57zX1iq ExkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=n9E4T/xop5F5qTyentEmXPNVArmnmPZs/r4EJlnP/Qk=; b=JO2u/SBDUcFg1j/b+innMFn+hvKqAoNCznCbc6Pc646h/gGsK2S70g+1MwC/XTCXYL cqPKqacjwDC3eMOJAKGLPb2f5I6906aueJwoSPTQd9JtJq+SWUQJ+PQ1xDc4KkpohMru NmTc+npJWslOg4xu4ZnQtaAAT+xMpXPKRr9r8cNKLE7ZkhV9O8SVP0KOD18kXIg5GOfm kNBMNrQ45xfKV7dcxdZkrW/YV6yUVxnV2Aphva3xQ4392skinPuvbbA52Tnl06XU80d0 XUzhUKRDGiGiFYf8W2Ulyv1nIPAR1Ol33lnH33MF/pMaWOZ3AyHr3VTJYYEhgN/9m/oD W4cA== X-Gm-Message-State: AOAM533qx47Wt10wtd9tBf+/Ke4DLAy7euzXSf1qcmIBXu77mpODn3js jyOq9uyMfFV/SmqPPdQ/jOxY+Bkzow+GT1XTFjXXcSODwtPUFg== X-Google-Smtp-Source: ABdhPJyGgGWlONGorjeUmNgOKNVYv+qBeqsayJgTEIZHJpFEANVYxnSByzuLY7jtLdvTO6SzYM2HPZM6hZdbdalh2SQ= X-Received: by 2002:a2e:a7cb:: with SMTP id x11mr1493472ljp.444.1636021569155; Thu, 04 Nov 2021 03:26:09 -0700 (PDT) MIME-Version: 1.0 References: <641bd039-a2e3-db73-dcc1-1b3d2707bfa9@cmatte.me> In-Reply-To: <641bd039-a2e3-db73-dcc1-1b3d2707bfa9@cmatte.me> From: Magnus Hagander Date: Thu, 4 Nov 2021 11:25:57 +0100 Message-ID: Subject: Re: Issue report: search function not working for private lists To: =?UTF-8?Q?C=C3=A9lestin_Matte?= Cc: pgsql-www@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000079874a05cff3f411" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000079874a05cff3f411 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Nov 4, 2021 at 10:42 AM C=C3=A9lestin Matte wrote: > There are several issues that prevent the correct installation of search > functions for private lists: > - it is only possible to define a single archive search server in pgweb's > settings.py, which makes it impossible to define both a public and a > private archives server, > - there does not seem to be any kind of permissions verifications in > pgweb/search/views.py that would allow only users subscribed to a list to > search into it. > > I've been told that this functionality did not indeed work for > postresql.org's private lists. > Yes, this is a known limitation. This is "documented" in a code comment: def search(request): if not settings.PUBLIC_ARCHIVES: # We don't support searching of non-public archives at all at this point. # XXX: room for future improvement return HttpResponseForbidden('Not public archives') --=20 Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/ --00000000000079874a05cff3f411 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Nov 4, 2021 at 10:42 AM C=C3= =A9lestin Matte <celestin.ma= tte@cmatte.me> wrote:
There are several issues that prevent the correct installation= of search functions for private lists:
- it is only possible to define a single archive search server in pgweb'= ;s settings.py, which makes it impossible to define both a public and a pri= vate archives server,
- there does not seem to be any kind of permissions verifications in pgweb/= search/views.py that would allow only users subscribed to a list to search = into it.

I've been told that this functionality did not indeed work for postresql.or= g's private lists.

Yes, this is= a known limitation. This is "documented" in a code comment:

def search(request):
=C2=A0 =C2=A0 if not settings.PUBLI= C_ARCHIVES:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 # We don't support searching= of non-public archives at all at this point.
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 # XXX: room for future improvement
=C2=A0 =C2=A0 =C2=A0 =C2=A0 retur= n HttpResponseForbidden('Not public archives')
=C2=A0
=

--
=C2=A0Magnus Hagander
=C2=A0Me: https://www.hagander.net/
=C2=A0Wor= k: https://www= .redpill-linpro.com/
--00000000000079874a05cff3f411--