diff --git a/templates/applications/fragments/environments.html b/templates/applications/fragments/environments.html index 7b39f730..a4970fe2 100644 --- a/templates/applications/fragments/environments.html +++ b/templates/applications/fragments/environments.html @@ -6,9 +6,7 @@ {% macro EnvironmentManagementTemplate( application, environments_obj, - new_env_form, - user_can_create_environment -) %} + new_env_form) %}

{{ "portfolios.applications.settings.environments" | translate }}

@@ -94,7 +92,7 @@ {%- endif %} - {% if user_can_create_environment -%} + {% if user_can(permissions.CREATE_ENVIRONMENT) -%} {% include "applications/fragments/add_new_environment.html" %} {%- endif %}
diff --git a/templates/applications/settings.html b/templates/applications/settings.html index cb610743..6eaf3bbe 100644 --- a/templates/applications/settings.html +++ b/templates/applications/settings.html @@ -57,9 +57,7 @@ {{ EnvironmentManagementTemplate( application, environments_obj, - new_env_form, - user_can_create_environment=user_can(permissions.CREATE_ENVIRONMENT) - ) }} + new_env_form) }} {% if user_can(permissions.DELETE_APPLICATION) %} {% set env_count = application.environments | length %}