← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1587951] [NEW] pure project admin can't view projects

 

Public bug reported:

With Domains enabled, if you create a Project, with a user who is an
admin on that project (but not a domain admin), the Identity > Projects
panel will return a 500 error:

Pure project admin doesn't have a domain token
Internal Server Error: /identity/
Traceback (most recent call last):
  File "/Users/rpeters/openstack/horizon/.venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/rpeters/openstack/horizon/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/Users/rpeters/openstack/horizon/horizon/decorators.py", line 52, in dec
    return view_func(request, *args, **kwargs)
  File "/Users/rpeters/openstack/horizon/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/Users/rpeters/openstack/horizon/.venv/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/Users/rpeters/openstack/horizon/.venv/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch
    return handler(request, *args, **kwargs)
  File "/Users/rpeters/openstack/horizon/horizon/tables/views.py", line 215, in get
    handled = self.construct_tables()
  File "/Users/rpeters/openstack/horizon/horizon/tables/views.py", line 206, in construct_tables
    handled = self.handle_table(table)
  File "/Users/rpeters/openstack/horizon/horizon/tables/views.py", line 121, in handle_table
    data = self._get_data_dict()
  File "/Users/rpeters/openstack/horizon/horizon/tables/views.py", line 243, in _get_data_dict
    self._data = {self.table_class._meta.name: self.get_data()}
  File "/Users/rpeters/openstack/horizon/openstack_dashboard/dashboards/identity/projects/views.py", line 115, in get_data
    t.domain_name = domain_lookup.get(t.domain_id)
AttributeError: 'NoneType' object has no attribute 'get'
[01/Jun/2016 15:10:37] "GET /identity/ HTTP/1.1" 500 324035

This is due to this section of code in
openstack_dashboard/dashboards/identity/projects/views.py returning None
for domain_lookup, making the .get() grumpy.

if api.keystone.VERSIONS.active >= 3:
    domain_lookup = api.keystone.domain_lookup(self.request)
        for t in tenants:
            t.domain_name = domain_lookup.get(t.domain_id)
return tenants

** Affects: horizon
     Importance: Undecided
     Assignee: Ryan Peters (rjpeter2)
         Status: New

** Changed in: horizon
     Assignee: (unassigned) => Ryan Peters (rjpeter2)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1587951

Title:
  pure project admin can't view projects

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  With Domains enabled, if you create a Project, with a user who is an
  admin on that project (but not a domain admin), the Identity >
  Projects panel will return a 500 error:

  Pure project admin doesn't have a domain token
  Internal Server Error: /identity/
  Traceback (most recent call last):
    File "/Users/rpeters/openstack/horizon/.venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
      response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "/Users/rpeters/openstack/horizon/horizon/decorators.py", line 36, in dec
      return view_func(request, *args, **kwargs)
    File "/Users/rpeters/openstack/horizon/horizon/decorators.py", line 52, in dec
      return view_func(request, *args, **kwargs)
    File "/Users/rpeters/openstack/horizon/horizon/decorators.py", line 36, in dec
      return view_func(request, *args, **kwargs)
    File "/Users/rpeters/openstack/horizon/.venv/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
      return self.dispatch(request, *args, **kwargs)
    File "/Users/rpeters/openstack/horizon/.venv/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch
      return handler(request, *args, **kwargs)
    File "/Users/rpeters/openstack/horizon/horizon/tables/views.py", line 215, in get
      handled = self.construct_tables()
    File "/Users/rpeters/openstack/horizon/horizon/tables/views.py", line 206, in construct_tables
      handled = self.handle_table(table)
    File "/Users/rpeters/openstack/horizon/horizon/tables/views.py", line 121, in handle_table
      data = self._get_data_dict()
    File "/Users/rpeters/openstack/horizon/horizon/tables/views.py", line 243, in _get_data_dict
      self._data = {self.table_class._meta.name: self.get_data()}
    File "/Users/rpeters/openstack/horizon/openstack_dashboard/dashboards/identity/projects/views.py", line 115, in get_data
      t.domain_name = domain_lookup.get(t.domain_id)
  AttributeError: 'NoneType' object has no attribute 'get'
  [01/Jun/2016 15:10:37] "GET /identity/ HTTP/1.1" 500 324035

  This is due to this section of code in
  openstack_dashboard/dashboards/identity/projects/views.py returning
  None for domain_lookup, making the .get() grumpy.

  if api.keystone.VERSIONS.active >= 3:
      domain_lookup = api.keystone.domain_lookup(self.request)
          for t in tenants:
              t.domain_name = domain_lookup.get(t.domain_id)
  return tenants

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1587951/+subscriptions


Follow ups