Don't show workspace nav items the user doesn't have access to
This commit is contained in:
parent
7b2a099ef3
commit
aa42f5671c
@ -16,6 +16,7 @@
|
|||||||
]
|
]
|
||||||
) }}
|
) }}
|
||||||
|
|
||||||
|
{% if user_can(permissions.VIEW_WORKSPACE_MEMBERS) %}
|
||||||
{{ SidenavItem(
|
{{ SidenavItem(
|
||||||
"Members",
|
"Members",
|
||||||
href=url_for("workspaces.workspace_members", workspace_id=workspace.id),
|
href=url_for("workspaces.workspace_members", workspace_id=workspace.id),
|
||||||
@ -29,12 +30,15 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
) }}
|
) }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if user_can(permissions.VIEW_USAGE_DOLLARS) %}
|
||||||
{{ SidenavItem(
|
{{ SidenavItem(
|
||||||
"Budget Report",
|
"Budget Report",
|
||||||
href=url_for("workspaces.workspace_reports", workspace_id=workspace.id),
|
href=url_for("workspaces.workspace_reports", workspace_id=workspace.id),
|
||||||
active=request.url_rule.rule.startswith('/workspaces/<workspace_id>/reports')
|
active=request.url_rule.rule.startswith('/workspaces/<workspace_id>/reports')
|
||||||
) }}
|
) }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if user_can(permissions.EDIT_WORKSPACE_INFORMATION) %}
|
{% if user_can(permissions.EDIT_WORKSPACE_INFORMATION) %}
|
||||||
{{ SidenavItem(
|
{{ SidenavItem(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user