Skip to content

Commit 29d37bb

Browse files
authored
Merge pull request #3439 from stsewd/dont-show-build-ideas
Don't show "build ideas" to unprivileged users
2 parents 9f4519b + c8e4aff commit 29d37bb

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

readthedocs/templates/builds/build_detail.html

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -97,26 +97,28 @@
9797
</span>
9898
</div>
9999

100-
{% if not build.success and build.commands.count < 4 %}
101-
<div class="build-ideas">
102-
<p>
103-
{% url 'wipe_version' build.version.project.slug build.version.slug as wipe_url %}
104-
{% blocktrans %}
105-
Having trouble with your build environment?
106-
Try <a href="{{ wipe_url }}">reseting it</a>.
107-
{% endblocktrans %}
108-
</p>
109-
</div>
110-
{% elif not build.success and "setup.py install" in build.commands.last.output %}
111-
<div class="build-ideas">
112-
<p>
113-
{% url 'projects_advanced' build.version.project.slug as advanced_url %}
114-
{% blocktrans %}
115-
Don't want <em>setup.py install</em> called?
116-
Change the <strong>Install Project</strong> setting in your <a href="{{ advanced_url }}">advanced settings</a>.
117-
{% endblocktrans %}
118-
</p>
119-
</div>
100+
{% if request.user|is_admin:project %}
101+
{% if not build.success and build.commands.count < 4 %}
102+
<div class="build-ideas">
103+
<p>
104+
{% url 'wipe_version' build.version.project.slug build.version.slug as wipe_url %}
105+
{% blocktrans %}
106+
Having trouble with your build environment?
107+
Try <a href="{{ wipe_url }}">reseting it</a>.
108+
{% endblocktrans %}
109+
</p>
110+
</div>
111+
{% elif not build.success and "setup.py install" in build.commands.last.output %}
112+
<div class="build-ideas">
113+
<p>
114+
{% url 'projects_advanced' build.version.project.slug as advanced_url %}
115+
{% blocktrans %}
116+
Don't want <em>setup.py install</em> called?
117+
Change the <strong>Install Project</strong> setting in your <a href="{{ advanced_url }}">advanced settings</a>.
118+
{% endblocktrans %}
119+
</p>
120+
</div>
121+
{% endif %}
120122
{% endif %}
121123

122124
{% if build.output %}

0 commit comments

Comments
 (0)