Re: [Mailman-Developers] Merging users

2015-08-04 Thread Aurelien Bompard
 Actually merging two existing users is indeed a tricky thing because users
 link to so many other interesting bits and pieces.  Two separate users have
 two separate memberships, linked addresses, preferred addresses, and yes,
 preferences.  There are also the created_on, display_name, and (the mostly
 unused) password attributes.

 How deep does merging users go?

Abhilash's fix is good but I need to actually merge users, so here's
how I would do it.
https://gitlab.com/mailman/mailman/merge_requests/32
The change sits on top of Abhilash's, so there's no conflict.

I don't think I'm missing anything as far as users are concerned, but
please have a look :-)

Cheers,
Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Merging users

2015-07-31 Thread Barry Warsaw
On Jul 21, 2015, at 06:39 PM, Aurelien Bompard wrote:

If I try to associate an existing address to an existing user (without
this address obviously), the Mailman API will reply with a 400 error
User already exists. Postorius currently does not detect that and
just errors out with a 500 page (but that's not the issue here).

I think I need to merge the two users, and that's currently not
supported. I believe it would be a useful feature, so I'd like to
discuss it here. IMHO, the only tricky part would be to merge the
preferences associated with each user, but if I know which of my two
users has priority, I can just resolve the conflicts that way.
Am I missing something? Do you agree it would be a useful feature to have?

So, Abhilash submitted a merge request to allow for unlinked addresses to be
linked to existing users via the REST API.

https://gitlab.com/mailman/mailman/merge_requests/30

That's essentially the correct fix for the first order problem (though there's
a subtle bug in the mr that I will fix manually).

If that answers your question, then great!

Actually merging two existing users is indeed a tricky thing because users
link to so many other interesting bits and pieces.  Two separate users have
two separate memberships, linked addresses, preferred addresses, and yes,
preferences.  There are also the created_on, display_name, and (the mostly
unused) password attributes.

How deep does merging users go?

Cheers,
-Barry
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Merging users

2015-07-29 Thread Abhilash Raj
On 29 July 2015 at 20:03, Abhilash Raj raj.abhila...@gmail.com wrote:

 Hi Eric,

 On 21 July 2015 at 23:31, Eric Searcy e...@linuxfoundation.org wrote:

 On 7/21/15 9:39 AM, Aurelien Bompard wrote:
  Hey devs!
 
  I'm hitting a problem when migrating from 2.1 to 3, but I think it's a
  generic issue (or rather a missing feature) and I'd like to fix it.
 
  If I try to associate an existing address to an existing user (without
  this address obviously), the Mailman API will reply with a 400 error
  User already exists. Postorius currently does not detect that and
  just errors out with a 500 page (but that's not the issue here).
 
  I think I need to merge the two users, and that's currently not
  supported. I believe it would be a useful feature, so I'd like to
  discuss it here. IMHO, the only tricky part would be to merge the
  preferences associated with each user, but if I know which of my two
  users has priority, I can just resolve the conflicts that way.
  Am I missing something? Do you agree it would be a useful feature to
 have?

 This is a generic issue for us too; not just migration-related.  I also
 would support consolidation/merging of Postorius users to solve this.

 In fact, there are a few inter-related blockers for us:

 a) authenticating as the wrong email address + attempt to add subscribed
 email as alternate (especially happens with social-type logins where
 correcting the authenticated email is a pain)


 I don't get any error while adding an already existing user. However,
 since
 I don't have postfix setup, I can't verify the address from email. I can
 however.
 do it from the backend.


Sorry for this one. Yes it indeed raise a 400 error when adding an already
subscribed address even if there is no User objects associated with it in
core.
This probably is a bug. Also, probably postorius should check this before
sending the confirmation email.




 b) cannot social-authenticate as an email address which is an alternate,
 not the primary


 So, it is correct that you cannot social-authenticate to the same account
 using an alternate address. I am thinking about how we can fix this.
 However, this is not a very critical bug. Even if you login into two
 seperate
 Postorius accounts, the underlying MailmanUser is the same. You can
 view your subscriptions from both the addresses in both the accounts.
 Also, you can change subscriptions to other alternate addresses in both
 the accounts.


 c) attempting to social-authenticate as an email address which exists
 but has no account ... at least I think this is what is described by
 https://bugs.launchpad.net/postorius/+bug/1227461 (no matching gitlab
 bug)


 I checked out this one it is no more a bug. I can login with person to an
 address
 that already exists and is not associated with any account.

 However, note that I am using the master branch from source code.

 --
 thanks,
 Abhilash Raj




-- 
thanks,
Abhilash Raj
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Merging users

2015-07-29 Thread Abhilash Raj
Hi Eric,

On 21 July 2015 at 23:31, Eric Searcy e...@linuxfoundation.org wrote:

 On 7/21/15 9:39 AM, Aurelien Bompard wrote:
  Hey devs!
 
  I'm hitting a problem when migrating from 2.1 to 3, but I think it's a
  generic issue (or rather a missing feature) and I'd like to fix it.
 
  If I try to associate an existing address to an existing user (without
  this address obviously), the Mailman API will reply with a 400 error
  User already exists. Postorius currently does not detect that and
  just errors out with a 500 page (but that's not the issue here).
 
  I think I need to merge the two users, and that's currently not
  supported. I believe it would be a useful feature, so I'd like to
  discuss it here. IMHO, the only tricky part would be to merge the
  preferences associated with each user, but if I know which of my two
  users has priority, I can just resolve the conflicts that way.
  Am I missing something? Do you agree it would be a useful feature to
 have?

 This is a generic issue for us too; not just migration-related.  I also
 would support consolidation/merging of Postorius users to solve this.

 In fact, there are a few inter-related blockers for us:

 a) authenticating as the wrong email address + attempt to add subscribed
 email as alternate (especially happens with social-type logins where
 correcting the authenticated email is a pain)


I don't get any error while adding an already existing user. However,  since
I don't have postfix setup, I can't verify the address from email. I can
however.
do it from the backend.


 b) cannot social-authenticate as an email address which is an alternate,
 not the primary


So, it is correct that you cannot social-authenticate to the same account
using an alternate address. I am thinking about how we can fix this.
However, this is not a very critical bug. Even if you login into two
seperate
Postorius accounts, the underlying MailmanUser is the same. You can
view your subscriptions from both the addresses in both the accounts.
Also, you can change subscriptions to other alternate addresses in both
the accounts.


 c) attempting to social-authenticate as an email address which exists
 but has no account ... at least I think this is what is described by
 https://bugs.launchpad.net/postorius/+bug/1227461 (no matching gitlab bug)


I checked out this one it is no more a bug. I can login with person to an
address
that already exists and is not associated with any account.

However, note that I am using the master branch from source code.

-- 
thanks,
Abhilash Raj
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Merging users

2015-07-21 Thread Eric Searcy
On 7/21/15 9:39 AM, Aurelien Bompard wrote:
 Hey devs!
 
 I'm hitting a problem when migrating from 2.1 to 3, but I think it's a
 generic issue (or rather a missing feature) and I'd like to fix it.
 
 If I try to associate an existing address to an existing user (without
 this address obviously), the Mailman API will reply with a 400 error
 User already exists. Postorius currently does not detect that and
 just errors out with a 500 page (but that's not the issue here).
 
 I think I need to merge the two users, and that's currently not
 supported. I believe it would be a useful feature, so I'd like to
 discuss it here. IMHO, the only tricky part would be to merge the
 preferences associated with each user, but if I know which of my two
 users has priority, I can just resolve the conflicts that way.
 Am I missing something? Do you agree it would be a useful feature to have?

This is a generic issue for us too; not just migration-related.  I also
would support consolidation/merging of Postorius users to solve this.

In fact, there are a few inter-related blockers for us:

a) authenticating as the wrong email address + attempt to add subscribed
email as alternate (especially happens with social-type logins where
correcting the authenticated email is a pain)
b) cannot social-authenticate as an email address which is an alternate,
not the primary
c) attempting to social-authenticate as an email address which exists
but has no account ... at least I think this is what is described by
https://bugs.launchpad.net/postorius/+bug/1227461 (no matching gitlab bug)

Eric



signature.asc
Description: OpenPGP digital signature
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9