Email shouldn't be a mandatory attribute

Bug #1260423 reported by Julie Pichon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Julie Pichon
Grizzly
Fix Released
Medium
Bernhard M. Wiedemann
Havana
Fix Released
Medium
Julie Pichon

Bug Description

When using a LDAP backend, it's possible that a user won't have the "email" attribute defined, however it should still be possible to edit the other fields.

Steps to reproduce (in an environment with keystone using a LDAP backend):
1. Log in as admin
2. Go to the Users dashboard
3. Select a user that doesn't have an email defined

Expected result:
4. "Edit user" modal opens

Actual result:
4. Error 500

Traceback:
File "/usr/lib/python2.7/site-packages/django/views/generic/edit.py" in get
  154. form = self.get_form(form_class)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/forms/views.py" in get_form
  82. return form_class(self.request, **self.get_form_kwargs())
File "/usr/lib/python2.7/site-packages/django/views/generic/edit.py" in get_form_kwargs
  41. kwargs = {'initial': self.get_initial()}
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/users/views.py" in get_initial
  103. 'email': user.email}
File "/opt/stack/python-keystoneclient/keystoneclient/base.py" in __getattr__
  425. raise AttributeError(k)

Exception Type: AttributeError at /admin/users/e005aa43475b403c8babdff86ea27c37/update/
Exception Value: email

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/61837

Changed in horizon:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/61837
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=faf5b2aead067ab00a936249085f65886edcb483
Submitter: Jenkins
Branch: master

commit faf5b2aead067ab00a936249085f65886edcb483
Author: Julie Pichon <email address hidden>
Date: Thu Dec 12 17:42:20 2013 +0000

    Gracefully handle Users with no email attribute

    In certain environments, such as when using Keystone with a LDAP
    backend, it's possible that the email attribute won't exist for all
    users.

    Change-Id: I71041be832206e52bfb73926199f2c89e0e84a0b
    Closes-Bug: #1260423

Changed in horizon:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/62613

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/havana)

Reviewed: https://review.openstack.org/62613
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=82b6e108d2a5233be3cc4bd254599f6c878f2dda
Submitter: Jenkins
Branch: stable/havana

commit 82b6e108d2a5233be3cc4bd254599f6c878f2dda
Author: Julie Pichon <email address hidden>
Date: Thu Dec 12 17:42:20 2013 +0000

    Gracefully handle Users with no email attribute

    In certain environments, such as when using Keystone with a LDAP
    backend, it's possible that the email attribute won't exist for all
    users.

    Change-Id: I71041be832206e52bfb73926199f2c89e0e84a0b
    Closes-Bug: #1260423

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to horizon (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/62839

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to horizon (master)

Reviewed: https://review.openstack.org/62839
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=19566878b24925bf423fe9588652ea59322af58d
Submitter: Jenkins
Branch: master

commit 19566878b24925bf423fe9588652ea59322af58d
Author: Dirk Mueller <email address hidden>
Date: Wed Dec 18 11:28:37 2013 +0100

    User email is optional and can be absent

    Change-Id: Idff0f7c33bcaee29c7d1e7be415eb6b5b29b5b1a
    Related-Bug: #1260423

Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to horizon (stable/grizzly)

Related fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/69552

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to horizon (stable/grizzly)

Reviewed: https://review.openstack.org/69552
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=3212dd03738e90a7b3bbc7ecb46317a0a8cc9c02
Submitter: Jenkins
Branch: stable/grizzly

commit 3212dd03738e90a7b3bbc7ecb46317a0a8cc9c02
Author: Dirk Mueller <email address hidden>
Date: Wed Dec 18 11:28:37 2013 +0100

    User email is optional and can be absent

    cherry-picked from faf5b2aead067ab00a936249085f65886edcb483
    cherry-picked from 19566878b24925bf423fe9588652ea59322af58d

    Change-Id: Idff0f7c33bcaee29c7d1e7be415eb6b5b29b5b1a
    Related-Bug: #1260423

tags: added: in-stable-grizzly
Alan Pevec (apevec)
tags: removed: in-stable-grizzly
Thierry Carrez (ttx)
Changed in horizon:
milestone: icehouse-2 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.