Skip to content
Permalink
Browse files
[JENKINS-14281] On Windows domain can be a null field
  • Loading branch information
fbelzunc committed Mar 14, 2017
1 parent 44528ab commit 2711542bf4ef59552b66ad5ead3802cdeb317348
Showing with 14 additions and 10 deletions.
  1. +14 −10 src/main/java/hudson/plugins/active_directory/ActiveDirectorySecurityRealm.java
@@ -325,17 +325,21 @@ public Object readResolve() throws ObjectStreamException {
this.domains.add(new ActiveDirectoryDomain(oldDomain, server));
}
}
// JENKINS-39375 Support a different bindUser per domain
if (bindName != null && bindPassword != null) {
for (ActiveDirectoryDomain activeDirectoryDomain : this.getDomains()) {
activeDirectoryDomain.bindName = bindName;
activeDirectoryDomain.bindPassword = bindPassword;
List <ActiveDirectoryDomain> activeDirectoryDomains = this.getDomains();
// JENKINS-14281 On Windows domain can be indeed null
if (activeDirectoryDomains!= null) {
// JENKINS-39375 Support a different bindUser per domain
if (bindName != null && bindPassword != null) {
for (ActiveDirectoryDomain activeDirectoryDomain : activeDirectoryDomains) {
activeDirectoryDomain.bindName = bindName;
activeDirectoryDomain.bindPassword = bindPassword;
}
}
}
// JENKINS-39423 Make site independent of each domain
if (site != null) {
for (ActiveDirectoryDomain activeDirectoryDomain : this.getDomains()) {
activeDirectoryDomain.site = site;
// JENKINS-39423 Make site independent of each domain
if (site != null) {
for (ActiveDirectoryDomain activeDirectoryDomain : activeDirectoryDomains) {
activeDirectoryDomain.site = site;
}
}
}
if (startTls == null) {

1 comment on commit 2711542

@uhafner
Copy link
Member

@uhafner uhafner commented on 2711542 Mar 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JENKINS-14281 is the wrong issue!

Please sign in to comment.