Skip to content

Commit a0862ac

Browse files
committed
Add none value
1 parent 6cc3839 commit a0862ac

File tree

1 file changed

+28
-6
lines changed
  • src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval

1 file changed

+28
-6
lines changed

src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly

+28-6
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,35 @@ THE SOFTWARE.
264264
</j:otherwise>
265265
</j:choose>
266266
<h4 id="approved-signatures">Signatures already approved:</h4>
267-
<textarea readonly="readonly" id="approvedSignatures" rows="10" cols="80">
268-
<j:forEach var="line" items="${it.approvedSignatures}">${line}<st:out value="&#10;"/></j:forEach>
269-
</textarea>
267+
<j:choose>
268+
<j:when test="${it.approvedSignatures.isEmpty()}">
269+
<p>
270+
None
271+
</p>
272+
</j:when>
273+
<j:otherwise>
274+
<p>
275+
<textarea readonly="readonly" id="approvedSignatures" rows="10" cols="80">
276+
<j:forEach var="line" items="${it.approvedSignatures}">${line}<st:out value="&#10;"/></j:forEach>
277+
</textarea>
278+
</p>
279+
</j:otherwise>
280+
</j:choose>
270281
<h4 id="approved-acl-signatures">Signatures already approved assuming permission check:</h4>
271-
<textarea readonly="readonly" id="aclApprovedSignatures" rows="10" cols="80">
272-
<j:forEach var="line" items="${it.aclApprovedSignatures}">${line}<st:out value="&#10;"/></j:forEach>
273-
</textarea>
282+
<j:choose>
283+
<j:when test="${it.aclApprovedSignatures.isEmpty()}">
284+
<p>
285+
None
286+
</p>
287+
</j:when>
288+
<j:otherwise>
289+
<p>
290+
<textarea readonly="readonly" id="aclApprovedSignatures" rows="10" cols="80">
291+
<j:forEach var="line" items="${it.aclApprovedSignatures}">${line}<st:out value="&#10;"/></j:forEach>
292+
</textarea>
293+
</p>
294+
</j:otherwise>
295+
</j:choose>
274296
<j:set var="dangerousApprovedSignatures" value="${it.dangerousApprovedSignatures}"/>
275297
<j:if test="${!empty(dangerousApprovedSignatures)}">
276298
<h4 id="dangerous-approved-signatures">Signatures already approved which <strong><font color="red">may have introduced a security vulnerability</font></strong> (recommend clearing):</h4>

0 commit comments

Comments
 (0)