Hide project switch menu when project is disabled

Same as a project list on header area, hide project switch menu
in project list page when project is disabled.

Change-Id: I9e8d893cf6e89f4c5c32d5e3e687977ef3000631
Closes-bug: #1562488
This commit is contained in:
Kenji Ishii 2016-03-27 10:52:22 +00:00
parent 09148f68d6
commit e05a8fe574
1 changed files with 2 additions and 1 deletions

View File

@ -36,7 +36,8 @@ class RescopeTokenToProject(tables.LinkAction):
# authorized_tenants, and that they are not currently scoped to
return next((True for proj in request.user.authorized_tenants
if proj.id == project.id and
project.id != request.user.project_id), False)
project.id != request.user.project_id and
project.enabled), False)
def get_link_url(self, project):
# redirects to the switch_tenants url which then will redirect