From c8e4aff6b3841df39046815cc877ca8e4d346bcc Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Thu, 21 Dec 2017 17:38:03 -0500 Subject: [PATCH] Don't show "build ideas" to unprivileged users Closes #3430 --- .../templates/builds/build_detail.html | 42 ++++++++++--------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/readthedocs/templates/builds/build_detail.html b/readthedocs/templates/builds/build_detail.html index e617ba59254..4f7fe1bc02d 100644 --- a/readthedocs/templates/builds/build_detail.html +++ b/readthedocs/templates/builds/build_detail.html @@ -97,26 +97,28 @@ - {% if not build.success and build.commands.count < 4 %} -
-

- {% url 'wipe_version' build.version.project.slug build.version.slug as wipe_url %} - {% blocktrans %} - Having trouble with your build environment? - Try reseting it. - {% endblocktrans %} -

-
- {% elif not build.success and "setup.py install" in build.commands.last.output %} -
-

- {% url 'projects_advanced' build.version.project.slug as advanced_url %} - {% blocktrans %} - Don't want setup.py install called? - Change the Install Project setting in your advanced settings. - {% endblocktrans %} -

-
+ {% if request.user|is_admin:project %} + {% if not build.success and build.commands.count < 4 %} +
+

+ {% url 'wipe_version' build.version.project.slug build.version.slug as wipe_url %} + {% blocktrans %} + Having trouble with your build environment? + Try reseting it. + {% endblocktrans %} +

+
+ {% elif not build.success and "setup.py install" in build.commands.last.output %} +
+

+ {% url 'projects_advanced' build.version.project.slug as advanced_url %} + {% blocktrans %} + Don't want setup.py install called? + Change the Install Project setting in your advanced settings. + {% endblocktrans %} +

+
+ {% endif %} {% endif %} {% if build.output %}