allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [3/5] allura git commit: [#8032] Default email id's created and confirmed.
Date Fri, 05 Feb 2016 17:32:14 GMT
[#8032] Default email id's created and confirmed.


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/9caa879e
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/9caa879e
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/9caa879e

Branch: refs/heads/master
Commit: 9caa879e77de6b60a07fcd0040ba94e410612f81
Parents: 7336d14
Author: dastanforever <pranav.sharma.nits@gmail.com>
Authored: Fri Dec 18 12:30:49 2015 +0530
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Fri Feb 5 12:22:44 2016 -0500

----------------------------------------------------------------------
 Allura/allura/websetup/bootstrap.py | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/9caa879e/Allura/allura/websetup/bootstrap.py
----------------------------------------------------------------------
diff --git a/Allura/allura/websetup/bootstrap.py b/Allura/allura/websetup/bootstrap.py
index 8bc04fe..111b4e3 100644
--- a/Allura/allura/websetup/bootstrap.py
+++ b/Allura/allura/websetup/bootstrap.py
@@ -338,6 +338,12 @@ def create_user(display_name, username=None, password='foo', make_project=False)
     user = M.User.register(dict(username=username,
                                 display_name=display_name),
                            make_project=make_project)
+    email = username+"@allura.local"
+    user.claim_address(email)
+    from allura.model.auth import EmailAddress
+    kw = {"email": email}
+    em = EmailAddress.get(**kw)
+    em.confirmed = True
     user.set_password(password)
     return user
 


Mime
View raw message