Hide edit project link for users that cannot edit projects

This commit is contained in:
Patrick Smith 2018-09-30 22:23:52 -04:00
parent aa42f5671c
commit 4577a37bad

View File

@ -25,10 +25,12 @@
<div class='block-list project-list-item'> <div class='block-list project-list-item'>
<header class='block-list__header'> <header class='block-list__header'>
<h2 class='block-list__title'>{{ project.name }} ({{ project.environments|length }} environments)</h2> <h2 class='block-list__title'>{{ project.name }} ({{ project.environments|length }} environments)</h2>
<a class='icon-link' href='{{ url_for("workspaces.edit_project", workspace_id=workspace.id, project_id=project.id) }}'> {% if user_can(permissions.RENAME_APPLICATION_IN_WORKSPACE) %}
{{ Icon('edit') }} <a class='icon-link' href='{{ url_for("workspaces.edit_project", workspace_id=workspace.id, project_id=project.id) }}'>
<span>edit</span> {{ Icon('edit') }}
</a> <span>edit</span>
</a>
{% endif %}
</header> </header>
<ul> <ul>
{% for environment in project.environments %} {% for environment in project.environments %}