Build: show "Cancel build" button only if user is admin
@@ -30,7 +30,7 @@ $(document).ready(function () {
{% block content %}
<div class="build build-detail" id="build-detail">
- {% if build.state != "finished" %}
+ {% if build.state != "finished" and request.user|is_admin:project %}
<form method="post" action="{% url "builds_detail" build.version.project.slug build.pk %}">
{% csrf_token %}
<input type="submit" value="{% trans "Cancel build" %}">
