Re: pglister: bug: Can't add moderators (and create lists)

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Célestin Matte <celestin(dot)matte(at)cmatte(dot)me>
Cc: PostgreSQL WWW <pgsql-www(at)postgresql(dot)org>
Subject: Re: pglister: bug: Can't add moderators (and create lists)
Date: 2021-09-20 12:02:49
Message-ID: CABUevEyo_guVcikA3YU7nicHjGK9VmOdxdzR5+4eUVViegUXcQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

On Sat, Sep 18, 2021 at 11:53 AM Célestin Matte
<celestin(dot)matte(at)cmatte(dot)me> wrote:
>
> Hello,
>
> I'm still in the process of writing an install script for pglister. I'm at the point where auth is working and I'm testing lists.
>
> In the interface (in /admin/lists/list/1/change/), I cannot create a list because the "Moderators" field is always empty, and django won't let me create a list without moderators.

The reason the moderators field is mandatory, is that it's what's used
to populate the list ownership alias. I think there may have been
other reasons as well, see the commit message in 78dc0eea, but I don't
recall exactly what they are. But that is definitely one reason for it
being there now, so we can't remove that.

You should be able to add any Subscriber as a moderator, they don't
have to be a member of the particular list. The Subscriber entry is
created the first time the user logged in, see
web/pglister/lists/migration.py. Did you somehow manage to log in
without this happening?

> As a workaround, I removed the necessity to have a moderator to test if I can add subscribers after list creation, but I still cannot add any after list creation. See migration attached (I added both patch and migration, I'm not sure how you're supposed to properly edit django apps)
> I'm a bit confused because django has "staff" and "superuser", but none of that is the same as moderators, and I can't seem to find the way to promote a user into one.

Staff and Superuser are django functions and have nothing to do with
the pglister "application level" features. They are both required to
access /admin/ though, but they don't affect the rest of the
application.

--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Célestin Matte 2021-09-20 16:15:45 Re: pglister: bug: Can't add moderators (and create lists)
Previous Message Noah Misch 2021-09-19 03:03:47 Re: mbox/pgsql-hackers.202003 missing all messages after 2020-03-09