Only show Workspaces in the side nav if the current user has a workspace

This commit is contained in:
Montana
2018-08-24 08:58:31 -04:00
parent 52f577aea6
commit 0da8aa6bab
2 changed files with 23 additions and 1 deletions

View File

@@ -21,6 +21,9 @@
{"label":"New Request", "href":url_for("requests.requests_form_new", screen=1), "icon": "plus", "active": g.matchesPath('/requests/new')},
]
) }}
{{ SidenavItem("Workspaces", href="/workspaces", icon="cloud", active=g.matchesPath('/workspaces')) }}
{% if g.current_user.workspace_roles %}
{{ SidenavItem("Workspaces", href="/workspaces", icon="cloud", active=g.matchesPath('/workspaces')) }}
{% endif %}
</ul>
</div>