Gilles Filippini a écrit le 19/07/2020 à 19:10 :
Gilles Filippini a écrit le 19/07/2020 à 18:00 :
Mark Sapiro a écrit le 19/07/2020 à 17:30 :
On 7/19/20 8:10 AM, Gilles Filippini wrote:
Hi,
I'm trying to understand the Mailman user model, and I'm confused about the respective roles of tables 'auth_user' and 'user'.
auth_user is a Django auth table. These are the users listed in the Django admin web UI.
user is Mailman core's users.
Both have an 'id' column referred to as 'user_id' when used as a foreign key. But there seems to be no relation at all between them as they use different ids for the same user.
Right, they are unrelated.
Our mailman server was migrated from mailman2 to mailman3 about 1.5 year ago, and there is an inconsistency I'd like to fix: 2 of our users have a registered Mailman account with their respective email addresses in table 'auth_user', but these very same addresses in the 'address' table are linked to another old admin account in the 'user' table.
Their Mailman account is the 'old' one. the auth_user account is a Django account
Then if add one of these addresses as a domain owner, it it the old admin address which is selected instead. How could I fix that?
That's because domain owner in a Mailman thing and involvs the Mailman user. You could delete the Django users via the Django admin UI and then re-register them via Postorius. That *might* work.
When login into postorius, it is the Django account that is used, right? Then how is the mailman account retrieved from there? It seems UUIDs are used in the process, but I fail understanding how, so far. Wouldn't it be safe to retrieve the new Mailman account associated to these Django users, and link there emails from 'address' table' to them?
Reading the mailman-web source code I understand now that the mailman account is retrieved from the Django account email address. Then both users are tied to the same old mailman admin account, and deleting then registering them again won't change anything on this aspect.
Would this work? 1- For both addresses, update their record in table 'address' to set 'user_id' to null 2- On their next login to Mailman-web, a new mailman account would be created and associated with their own email address.
Done that, and it worked.
Thanks,
_g.