~yolanda.robla/horizon/precise-security

« back to all changes in this revision

Viewing changes to horizon/context_processors.py

  • Committer: Package Import Robot
  • Author(s): Adam Gandelman, Adam Gandelman, Chuck Short
  • Date: 2012-03-16 12:29:27 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20120316122927-aqr0xzbo1f9rxl1h
Tags: 2012.1~rc1~20120315.1545-0ubuntu1
[Adam Gandelman]
* New upstream release. 

[Chuck Short]
* debian/control: Update run-time depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
 
57
57
    # Auth/Keystone context
58
58
    context.setdefault('authorized_tenants', [])
59
 
    if request.user.is_authenticated():
 
59
    current_dash = request.horizon['dashboard']
 
60
    needs_tenants = getattr(current_dash, 'supports_tenants', False)
 
61
    if request.user.is_authenticated() and needs_tenants:
60
62
        context['authorized_tenants'] = request.user.authorized_tenants
61
63
 
62
64
    # Region context/support