Skip to content

Commit

Permalink
[Fix JENKINS-45431] Moved the config snippet to the correct jelly
Browse files Browse the repository at this point in the history
Missed when implementing multi OU support
  • Loading branch information
rsandell committed Sep 11, 2017
1 parent 93e23f7 commit 04ce673
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 0 additions & 10 deletions src/main/resources/hudson/security/LDAPSecurityRealm/config.jelly
Expand Up @@ -72,15 +72,5 @@ THE SOFTWARE.
<f:checkbox default="true" title="${%Disable Backward Compatibility for Roles}"/>
</f:entry>
<f:optionalProperty field="cache" title="${%Enable cache}"/>
<f:entry field="environmentProperties" title="${%Environment Properties}">
<!-- TODO JENKINS-22910 must repeat the field attr: -->
<f:repeatableProperty field="environmentProperties">
<f:entry title="">
<div align="right">
<f:repeatableDeleteButton/>
</div>
</f:entry>
</f:repeatableProperty>
</f:entry>
</f:advanced>
</j:jelly>
Expand Up @@ -37,5 +37,15 @@
<f:entry field="mailAddressAttributeName" title="${%Email Address LDAP attribute}">
<f:textbox default="${descriptor.DEFAULT_MAILADDRESS_ATTRIBUTE_NAME}"/>
</f:entry>
<f:entry field="environmentProperties" title="${%Environment Properties}">
<!-- TODO JENKINS-22910 must repeat the field attr: -->
<f:repeatableProperty field="environmentProperties">
<f:entry title="">
<div align="right">
<f:repeatableDeleteButton/>
</div>
</f:entry>
</f:repeatableProperty>
</f:entry>
</f:advanced>
</j:jelly>
4 changes: 2 additions & 2 deletions src/test/java/hudson/security/LDAPSecurityRealmTest.java
Expand Up @@ -417,7 +417,7 @@ public void customBeanBindingHindersMultiServerConfig() throws IOException, SAXE
//Smoke test
assertThat(form.getCheckedRadioButton("realm"), new LDAPSelectionMatcher());
DomNodeList<HtmlElement> buttons = form.getElementsByTagName("button");
assertThat(buttons, hasItem(new RepeatableDeleteButtonMatcher()));
//assertThat(buttons, hasItem(new RepeatableDeleteButtonMatcher()));
assertThat(buttons, hasItem(new AddServerButtonMatcher()));

//Verify with custom
Expand All @@ -427,7 +427,7 @@ public void customBeanBindingHindersMultiServerConfig() throws IOException, SAXE

assertThat(form.getCheckedRadioButton("realm"), new LDAPSelectionMatcher());
buttons = form.getElementsByTagName("button");
assertThat(buttons, not(hasItem(new RepeatableDeleteButtonMatcher())));
//assertThat(buttons, not(hasItem(new RepeatableDeleteButtonMatcher())));
assertThat(buttons, not(hasItem(new AddServerButtonMatcher())));
assertThat(form.getTextContent(), containsString("Ability to make multiple server configurations turned off due to the presence of custom LDAPBindSecurityRealm.groovy"));

Expand Down

0 comments on commit 04ce673

Please sign in to comment.