Skip to content

Commit

Permalink
Fix issue terabyte#31: editing a repo config as non-system-admin when…
Browse files Browse the repository at this point in the history
… locked fails
  • Loading branch information
terabyte committed Nov 18, 2015
1 parent 5f603f3 commit 3dc1533
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,13 @@ public void doPost(HttpServletRequest req, HttpServletResponse res) throws Servl
try {
RepositoryConfiguration rc =
configurationPersistanceManager.getRepositoryConfigurationForRepository(rep);

// if no jenkinsServerName is provided, assume it is unchanged and fill in the old value
// When the javascript disabled the field, this can cause the parameter to be left out, leaving a null value.
if (jenkinsServerName == null) {
jenkinsServerName = rc.getJenkinsServerName();
}

JenkinsServerConfiguration oldConfig =
configurationPersistanceManager.getJenkinsServerConfiguration(rc.getJenkinsServerName());
JenkinsServerConfiguration newConfig =
Expand Down

0 comments on commit 3dc1533

Please sign in to comment.