Ticket #11080: trac_11080-user_registration.patch

File trac_11080-user_registration.patch, 1.2 KB (added by ppurka, 9 years ago)

(temporary fix) apply to devel/sagenb

  • flask_version/authentication.py

    diff --git a/flask_version/authentication.py b/flask_version/authentication.py
    index 2b7b6e2..e905c61 100644
    a b waiting = {} 
    9494@authentication.route('/register', methods = ['GET','POST'])
    9595@with_lock
    9696def register():
     97    if not g.notebook.user_manager().get_accounts():
     98        return redirect(url_for('base.index'))
    9799    from sagenb.notebook.misc import is_valid_username, is_valid_password, \
    98100    is_valid_email, do_passwords_match
    99101    from sagenb.notebook.challenge import challenge
  • sagenb/notebook/run_notebook.py

    diff --git a/sagenb/notebook/run_notebook.py b/sagenb/notebook/run_notebook.py
    index da1a136..ba81147 100644
    a b def notebook_twisted(self, 
    292292
    293293    if accounts is not None:
    294294        nb.user_manager().set_accounts(accounts)
    295     elif not nb.conf()['accounts']:
    296         nb.user_manager().set_accounts(True)
     295    else:
     296        nb.user_manager().set_accounts(nb.conf()['accounts'])
    297297   
    298298    if nb.user_manager().user_exists('root') and not nb.user_manager().user_exists('admin'):
    299299        # This is here only for backward compatibility with one