Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Follow up fix as pointed out by Daniel Beck.
  • Loading branch information
kohsuke committed Jan 20, 2014
1 parent f1e4440 commit 02ab748
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/resources/hudson/model/Run/logKeep.jelly
Expand Up @@ -29,10 +29,10 @@ THE SOFTWARE.
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<j:if test="${it.parent.logRotator!=null and it.canToggleLogKeep()}">
<form method="get" action="toggleLogKeep" style="margin-top:1em">

This comment has been minimized.

Copy link
@daniel-beck

daniel-beck Jan 20, 2014

Member

This form will be shown even if the button below is hidden. Not sure whether that affects behavior (#1093 had the same issue).

<j:if test="${it.keepLog}">
<j:if test="${it.keepLog and h.hasPermission(it,it.DELETE)}">
<f:submit value="${%Don't keep this build forever}" />
</j:if>
<j:if test="${!it.keepLog}">
<j:if test="${!it.keepLog and h.hasPermission(it,it.UPDATE)}">

This comment has been minimized.

Copy link
@daniel-beck

daniel-beck Jan 20, 2014

Member

Redundant, see AbstractBuild's index.jelly line ~32.

Note that this also means that both UPDATE and DELETE are needed to disable keep forever on the UI, while internally, DELETE should suffice. Not sure which behavior is better (I'd opt for requiring both).

<f:submit value="${%Keep this build forever}" />
</j:if>
</form>
Expand Down

0 comments on commit 02ab748

Please sign in to comment.