Version-Release number of selected component (if applicable): 0.16 How reproducible: always Steps to Reproduce: 1. Configure Beaker's LDAP integration 2. Create a Beaker account with your e-mail address from LDAP but a different username 3. Log in using your LDAP account Actual results: 500 response: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request() File "/usr/lib/python2.6/site-packages/flask/app.py", line 1477, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/lib/python2.6/site-packages/flask/app.py", line 1381, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/lib/python2.6/site-packages/flask/app.py", line 1473, in full_dispatch_request rv = self.preprocess_request() File "/usr/lib/python2.6/site-packages/flask/app.py", line 1666, in preprocess_request rv = func() File "/usr/lib/python2.6/site-packages/bkr/server/identity.py", line 83, in check_authentication user = User.by_user_name(user_name.decode('utf8')) File "/usr/lib/python2.6/site-packages/bkr/server/model/identity.py", line 180, in by_user_name session.flush() [...] IntegrityError: (IntegrityError) (1062, "Duplicate entry 'luliu' for key 'email_address'") 'INSERT INTO tg_user (user_name, email_address, display_name, password, root_password, rootpw_changed, created, disabled, removed) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)' ('luliu', 'luliu', 'Lu Liu', None, None, None, datetime.datetime(2014, 5, 6, 8, 51, 33, 615050), 0, None) Expected results: Login should succeed and a user account should be created based on LDAP info. Additional info: I think we should just remove the constraint forcing e-mail addresses to be unique. From digging in git it seems we inherited it from TurboGears. Beaker itself never actually looks up people by e-mail address so I don't see any reason why Beaker should care if they are unique. Removing the unique constraint would also save us a lot of drama in the web UI, which goes to great lengths to validate the uniqueness of e-mail addresses.
On Gerrit: http://gerrit.beaker-project.org/3066
Beaker 0.17.0 has been released.