From 14daa16ef0528b2ceff0c8cb59611d938704c125 Mon Sep 17 00:00:00 2001 From: Andrew Croce Date: Thu, 20 Sep 2018 15:12:33 -0400 Subject: [PATCH] add permission check for can_create_projects --- templates/workspaces/reports/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/workspaces/reports/index.html b/templates/workspaces/reports/index.html index a908755f..18198ea5 100644 --- a/templates/workspaces/reports/index.html +++ b/templates/workspaces/reports/index.html @@ -104,6 +104,8 @@ {% set reports_url = url_for("workspaces.workspace_reports", workspace_id=workspace.id) %} {% if not monthly_totals['environments'] %} + + {% set can_create_projects = user_can(permissions.ADD_APPLICATION_IN_WORKSPACE) %} {% set message = 'This Workspace has no Cloud Environments setup, hence there is no spending data to report. Create a Project with some Cloud Environments to get started.' if can_create_projects else 'This Workspace has no Cloud Environments setup, hence there is no spending data to report. Contact the Workspace Owner to set up some Cloud Environments.'