#8032 Set up primary emails for test users (paster setup-app)

v1.4.0
closed
None
General
2016-02-05
2015-12-09
No

If user does not have primary email some functionality is not working (notifications and stuff).

We should set up primary emails for test users. Anytime I'm re-creating my dev environment I'm manually creating emails for at least root, admin and test-user-1. And it's pretty painful, since you need to type email, re-type the password, get confirmation link from server logs.

Its low priority, obviously, but would be good to have.

Related

Git: 1025fee8
Git: f65caf04
Git: f69e3669
Git: ff5586e0

Discussion

  • Pranav Sharma

    Pranav Sharma - 2015-12-11
    • status: open --> in-progress
     
  • Pranav Sharma

    Pranav Sharma - 2015-12-11

    Specifically which accounts are to be given an email id? And what would they be?

     
    • Igor Bondarenko

      Igor Bondarenko - 2015-12-11

      I'm thinking all of the accoounts created in bootstrap.py during setup should have emails.

      They can be in a form "<username>@allura.local" or something like that. It's just fake, test data.

       
      • Pranav Sharma

        Pranav Sharma - 2015-12-17

        I found only two ways to add a confirmed email.

        1. Add the email through post on '/auth/save_new' and then to '/auth/verify_addr'.
        2. Changing the Model.EmailAddress.conformed property directly to true.

        Is there any other way? If not, which should be preferred from the above?

         
        • Dave Brondsema

          Dave Brondsema - 2015-12-17

          save_new calls claim_address which looks like a useful helper function to run. And then after that setting the .confirmed property directly seems fine to me.

           
          • Pranav Sharma

            Pranav Sharma - 2015-12-18

            The "save_new" requires a turbogears session. The session is not available during paster setup-app. So I did a workaround of user claiming the email address, and then confirming it.

            https://forge-allura.apache.org/p/allura/git/merge-requests/66/

             

            Last edit: Pranav Sharma 2015-12-18
  • Dave Brondsema

    Dave Brondsema - 2016-02-05
    • status: in-progress --> closed
    • assigned_to: Pranav Sharma
    • Reviewer: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2016-04-11
    • Milestone: unreleased --> v1.4.0
     

Log in to post a comment.