Lists: | pgsql-www |
---|
From: | Célestin Matte <celestin(dot)matte(at)cmatte(dot)me> |
---|---|
To: | pgsql-www(at)postgresql(dot)org |
Subject: | [PATCH] pgweb: auth.py: make it possible to customize email address in error message |
Date: | 2023-12-19 16:51:47 |
Message-ID: | 79ee1e4d-ef04-414e-a5e0-1732590ff763@cmatte.me |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-www |
auth.py contains an error message with an hardcoded @postgresql.org email address.
This patch makes it possible to change it using a variable in the settings.
I used ADMINS because it already exists in pgweb with the correct value (and pgarchives), but that can be discussed as it doesn't exist in pglister.
--
Célestin Matte
Attachment | Content-Type | Size |
---|---|---|
0001-auth.py-make-it-possible-to-customize-email-address-.patch | text/x-patch | 1.7 KB |
From: | Akshat Jaimini <destrex271(at)gmail(dot)com> |
---|---|
To: | Célestin Matte <celestin(dot)matte(at)cmatte(dot)me>, pgsql-www(at)lists(dot)postgresql(dot)org |
Subject: | Re: [PATCH] pgweb: auth.py: make it possible to customize email address in error message |
Date: | 2023-12-20 16:05:05 |
Message-ID: | CAMaW3Vg5ZVFkoFrb4mv7dvDKFOfxGwvPg8OUQSGBiOm40LS=SA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-www |
We actually have a new tool that tests all the functionalities in the
website. So just wanted to run it through that before.
I'll run the tests against your gitlab mirror.
Checkout the harness here:
https://github.com/destrex271/pgweb-testing-harness
Regards,
Akshat Jaimini
On Wed, 20 Dec, 2023, 20:11 Célestin Matte, <celestin(dot)matte(at)cmatte(dot)me>
wrote:
> Hello,
>
> Not sure what you're asking — I don't have access to the pgweb repo
> Do you mean a pull request?
> My local copy is on gitlab:
> https://gitlab.com/cmatte/pgweb/-/tree/auth_email?ref_type=heads
>
> Regards,
>
> On 20/12/2023 14:32, Akshat Jaimini wrote:
> > Hi!
> > It would be great if we could test this patch with the testing harness
> to confirm that nothing would break(although I am sure nothing would but
> there's no harm in testing).
> >
> > Is it possible to setup a develop/testing branch on the pgweb repo from
> where the harness can pull it?
> >
> > Regards,
> > Akshat Jaimini
> >
> > On Tue, 19 Dec, 2023, 22:21 Célestin Matte, <celestin(dot)matte(at)cmatte(dot)me
> <mailto:celestin(dot)matte(at)cmatte(dot)me>> wrote:
> >
> > auth.py contains an error message with an hardcoded @postgresql.org
> <http://postgresql.org> email address.
> > This patch makes it possible to change it using a variable in the
> settings.
> > I used ADMINS because it already exists in pgweb with the correct
> value (and pgarchives), but that can be discussed as it doesn't exist in
> pglister.
> >
> > --
> > Célestin Matte
> >
>
> --
> Célestin Matte
>
>
From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Célestin Matte <celestin(dot)matte(at)cmatte(dot)me> |
Cc: | pgsql-www(at)postgresql(dot)org |
Subject: | Re: [PATCH] pgweb: auth.py: make it possible to customize email address in error message |
Date: | 2023-12-20 19:16:30 |
Message-ID: | CABUevEyjvzTA8QXjsd_-0bmxxR5--LEUWvPfXTiN7+fYoaLcZg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-www |
On Tue, Dec 19, 2023 at 5:51 PM Célestin Matte <celestin(dot)matte(at)cmatte(dot)me> wrote:
>
> auth.py contains an error message with an hardcoded @postgresql.org email address.
> This patch makes it possible to change it using a variable in the settings.
> I used ADMINS because it already exists in pgweb with the correct value (and pgarchives), but that can be discussed as it doesn't exist in pglister.
Maybe the correct choice is to actually add it to pglister?
That said, having a fallback is probably still a good idea since we
have loads of servers that run this auth.py plugin, but for the
pglister specific thing I think that would be a reasonable thing to
expect?
--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/
From: | Célestin Matte <celestin(dot)matte(at)cmatte(dot)me> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-www(at)postgresql(dot)org |
Subject: | Re: [PATCH] pgweb: auth.py: make it possible to customize email address in error message |
Date: | 2023-12-21 17:39:15 |
Message-ID: | ae313e50-5ae1-4285-af2b-9d4b48b2f76a@cmatte.me |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-www |
> Maybe the correct choice is to actually add it to pglister?
Alright, patched for pglister attached.
Also attached a patch for pgarchives, because while ADMINS is defined, there is no default value. (Note: this variable is only used for auth.py)
--
Célestin Matte
Attachment | Content-Type | Size |
---|---|---|
0001-Add-ADMINS-to-settings.py-for-error-message-in-auth..patch | text/x-patch | 783 bytes |
0001-Give-default-value-to-ADMINS-in-settings.py-for-erro.patch | text/x-patch | 724 bytes |