Skip to content

Commit 4900744

Browse files
authored
[JENKINS-74512] Allow configuration editing when content security policy is enabled (#320)
* Use default width for expression editor Using only half the width is unhelpful * [JENKINS-74512] Allow configuration editing when content security policy is enabled https://issues.jenkins.io/browse/JENKINS-74512 notes that the implied labels plugin fails to edit label implications when content security policy is enabled. The configure page reports that the current user does not have permission to view the page or the page does not exist. https://www.jenkins.io/doc/developer/security/csp/#legacy-javascript-checkurl-validation describes the steps that were needed to allow the plugin to support content security policy. Testing done: * Interactive testing confirmed that modifying the expression with a valid value produces no error message and saves as expected and that modifying with an invalid expression shows a message. That is the same behavior as the current release * Automated tests all pass
1 parent 2973868 commit 4900744

File tree

1 file changed

+1
-1
lines changed
  • src/main/resources/org/jenkinsci/plugins/impliedlabels/Config

1 file changed

+1
-1
lines changed

src/main/resources/org/jenkinsci/plugins/impliedlabels/Config/configure.jelly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ THE SOFTWARE.
4343
<f:entry>
4444
<label>${%Labels}<f:textbox value="${impl.atomsString()}" field="atoms" style="width: 30%" autoCompleteDelimChar=" " autoCompleteUrl="${rootURL}/label-implications/autoCompleteLabels"/></label>
4545
<st:nbsp/>
46-
<labels>${%Expression}<f:textbox value="${impl.expressionString()}" field="expression" style="width: 50%" checkUrl="'${rootURL}/label-implications/checkExpression?expression='+encodeURIComponent(this.value)" autoCompleteUrl="${rootURL}/label-implications/autoCompleteLabels" autoCompleteDelimChar=" "/></labels>
46+
<labels>${%Expression}<f:textbox value="${impl.expressionString()}" field="expression" checkUrl="${rootURL}/label-implications/checkExpression" checkDependsOn="expression" autoCompleteUrl="${rootURL}/label-implications/autoCompleteLabels" autoCompleteDelimChar=" "/></labels>
4747
<st:nbsp/>
4848
<f:repeatableDeleteButton />
4949
</f:entry>

0 commit comments

Comments
 (0)