Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't show "build ideas" to unprivileged users #3439

Merged
merged 1 commit into from
Dec 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 22 additions & 20 deletions readthedocs/templates/builds/build_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,26 +97,28 @@
</span>
</div>

{% if not build.success and build.commands.count < 4 %}
<div class="build-ideas">
<p>
{% url 'wipe_version' build.version.project.slug build.version.slug as wipe_url %}
{% blocktrans %}
Having trouble with your build environment?
Try <a href="{{ wipe_url }}">reseting it</a>.
{% endblocktrans %}
</p>
</div>
{% elif not build.success and "setup.py install" in build.commands.last.output %}
<div class="build-ideas">
<p>
{% url 'projects_advanced' build.version.project.slug as advanced_url %}
{% blocktrans %}
Don't want <em>setup.py install</em> called?
Change the <strong>Install Project</strong> setting in your <a href="{{ advanced_url }}">advanced settings</a>.
{% endblocktrans %}
</p>
</div>
{% if request.user|is_admin:project %}
{% if not build.success and build.commands.count < 4 %}
<div class="build-ideas">
<p>
{% url 'wipe_version' build.version.project.slug build.version.slug as wipe_url %}
{% blocktrans %}
Having trouble with your build environment?
Try <a href="{{ wipe_url }}">reseting it</a>.
{% endblocktrans %}
</p>
</div>
{% elif not build.success and "setup.py install" in build.commands.last.output %}
<div class="build-ideas">
<p>
{% url 'projects_advanced' build.version.project.slug as advanced_url %}
{% blocktrans %}
Don't want <em>setup.py install</em> called?
Change the <strong>Install Project</strong> setting in your <a href="{{ advanced_url }}">advanced settings</a>.
{% endblocktrans %}
</p>
</div>
{% endif %}
{% endif %}

{% if build.output %}
Expand Down