Skip to content

Commit

Permalink
Merge branch 'JENKINS-22028' of github.com:daniel-beck/jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed May 12, 2014
2 parents b8c3f61 + ac3a5cd commit 4770a7b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Expand Up @@ -99,15 +99,16 @@ public boolean configure(StaplerRequest req, JSONObject json) throws hudson.mode
} catch (IOException e) {
throw new hudson.model.Descriptor.FormException(e, "slaveAgentPortType");
}
if (security.has("markupFormatter")) {
j.setMarkupFormatter(req.bindJSON(MarkupFormatter.class, security.getJSONObject("markupFormatter")));
} else {
j.setMarkupFormatter(null);
}
} else {
j.disableSecurity();
}

if (json.has("markupFormatter")) {
j.setMarkupFormatter(req.bindJSON(MarkupFormatter.class, json.getJSONObject("markupFormatter")));
} else {
j.setMarkupFormatter(null);
}

// persist all the additional security configs
boolean result = true;
for(Descriptor<?> d : Functions.getSortedDescriptorsForGlobalConfig(FILTER)){
Expand Down
1 change: 0 additions & 1 deletion core/src/main/java/jenkins/model/Jenkins.java
Expand Up @@ -2081,7 +2081,6 @@ public void disableSecurity() {
useSecurity = null;
setSecurityRealm(SecurityRealm.NO_AUTHENTICATION);
authorizationStrategy = AuthorizationStrategy.UNSECURED;
markupFormatter = null;
}

public void setProjectNamingStrategy(ProjectNamingStrategy ns) {
Expand Down
Expand Up @@ -33,8 +33,6 @@ l.layout(norefresh:true, permission:app.ADMINISTER, title:my.displayName) {
f.checkbox()
}

f.dropdownDescriptorSelector(title:_("Markup Formatter"),descriptors: MarkupFormatterDescriptor.all(), field: 'markupFormatter')

f.entry(title:_("Access Control")) {
table(style:"width:100%") {
f.descriptorRadioList(title:_("Security Realm"),varName:"realm", instance:app.securityRealm, descriptors:SecurityRealm.all())
Expand All @@ -43,6 +41,8 @@ l.layout(norefresh:true, permission:app.ADMINISTER, title:my.displayName) {
}
}

f.dropdownDescriptorSelector(title:_("Markup Formatter"),descriptors: MarkupFormatterDescriptor.all(), field: 'markupFormatter')

Functions.getSortedDescriptorsForGlobalConfig(my.FILTER).each { Descriptor descriptor ->
set("descriptor",descriptor)
set("instance",descriptor)
Expand Down

0 comments on commit 4770a7b

Please sign in to comment.