Skip to content

Commit

Permalink
Do not show Build button when user is not project admin
Browse files Browse the repository at this point in the history
Closes #3303
  • Loading branch information
humitos committed Nov 23, 2017
1 parent 86f705f commit 7fa70a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion readthedocs/templates/builds/build_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{% load i18n %}

{% load pagination_tags %}
{% load privacy_tags %}
{% load projects_tags %}

{% block title %}Builds{% endblock %}
Expand Down Expand Up @@ -37,7 +38,7 @@
<div class="module-wrapper">

{% block build_versions %}
{% if versions %}
{% if versions and request.user|is_admin:project %}
<div class="module-header">
<div style="float:right;">
<form method="post" action="{% url "builds_project_list" project.slug %}">
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/templates/core/project_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h3>{% trans "Versions" %}</h3>
</div>

{% block build_versions %}
{% if versions %}
{% if versions and request.user|is_admin:project %}
<div class="build_a_version">
<h3>{% trans "Build a version" %}</h3>
<div class="version_right">
Expand Down

0 comments on commit 7fa70a4

Please sign in to comment.