Skip to content
Permalink
Browse files

Merge pull request #110 from jenkinsci/JENKINS-44324

[FIXED JENKINS-44324] fix readResolve() of build cards for ancient ve…
  • Loading branch information...
dalvizu committed Jun 19, 2017
2 parents 08939fa + bfa47e5 commit 6fab1fdbd64b3251bc9970495b0501a27ef000b5
@@ -293,28 +293,23 @@ protected Object readResolve() {
if (selectedJob != null) {
gridBuilder = new DownstreamProjectGridBuilder(selectedJob);
}
} else {
// safe to assume an existing install, check if we need to migrate
// header config
if (columnHeaders == null) {
if (!showPipelineDefinitionHeader) {
columnHeaders = new NullColumnHeader();
} else if (showPipelineParametersInHeaders) {
columnHeaders = new BuildVariablesHeader();
} else {
columnHeaders = new SimpleColumnHeader();
}
}
if (columnHeaders == null) {
if (!showPipelineDefinitionHeader) {
columnHeaders = new NullColumnHeader();
} else if (showPipelineParametersInHeaders) {
columnHeaders = new BuildVariablesHeader();
} else {
columnHeaders = new SimpleColumnHeader();
}
if (rowHeaders == null) {
if (showPipelineParameters) {
rowHeaders = new BuildVariablesHeader();
} else {
rowHeaders = new SimpleRowHeader();
}
}
if (rowHeaders == null) {
if (showPipelineParameters) {
rowHeaders = new BuildVariablesHeader();
} else {
rowHeaders = new SimpleRowHeader();
}
}


return this;
}

@@ -996,18 +991,25 @@ public Item doCreateItem(final StaplerRequest req, final StaplerResponse rsp) th

@Override
public boolean hasPermission(final Permission p) {
boolean display = true;
//tester la liste vide seulement en lecture
if (READ.name.equals(p.name)) {
if (isEmpty()) {
display = false;
try {
boolean display = true;
//tester la liste vide seulement en lecture
if (READ.name.equals(p.name)) {
if (isEmpty()) {
display = false;
}
} else {
//Pas en lecture => permission standard
display = super.hasPermission(p);
}
} else {
//Pas en lecture => permission standard
display = super.hasPermission(p);
}

return display;
return display;
} catch (Throwable t) {
// JENKINS-44324This can be called from jenkins just determinig if it needs to show the
// pipeline tab, so if there are any errors don't blow up
LOGGER.log(Level.SEVERE, "Error in hasPermission: ", t);
return false;
}
}

/**

0 comments on commit 6fab1fd

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.