You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2015/07/13 20:15:16 UTC
[2/7] allura git commit: [#5943] ticket:815 Improve root user
creation in setup-app
[#5943] ticket:815 Improve root user creation in setup-app
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/e94786f3
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/e94786f3
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/e94786f3
Branch: refs/heads/master
Commit: e94786f3e7dcfd0eca65ec5642d655449775ed05
Parents: 5f3e726
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri Jul 10 12:34:07 2015 +0300
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Mon Jul 13 18:14:37 2015 +0000
----------------------------------------------------------------------
Allura/allura/websetup/bootstrap.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/e94786f3/Allura/allura/websetup/bootstrap.py
----------------------------------------------------------------------
diff --git a/Allura/allura/websetup/bootstrap.py b/Allura/allura/websetup/bootstrap.py
index 37e250e..33a3f3c 100644
--- a/Allura/allura/websetup/bootstrap.py
+++ b/Allura/allura/websetup/bootstrap.py
@@ -119,20 +119,20 @@ def bootstrap(command, conf, vars):
if create_test_data:
root = create_user('Root', make_project=False)
else:
- # TODO: ask user to provide username/password for root
+ from getpass import getpass
root_name = raw_input('Enter username for root user (default "root"): ').strip()
if not root_name:
root_name = 'root'
ok = False
while not ok:
- root_password1 = raw_input('Enter password: ').strip()
- root_password2 = raw_input('Confirm password: ').strip()
+ root_password1 = getpass('Enter password: ')
if len(root_password1) == 0:
- log.info('Please, provide password')
- return
+ log.info('Password must not be empty')
+ continue
+ root_password2 = getpass('Confirm password: ')
if root_password1 != root_password2:
log.info("Passwords don't match")
- return
+ continue
root = create_user(root_name, password=root_password1, make_project=False)
ok = True