// TODO SlaveComputer.doSlaveAgentJnlp; there should be an annotation to request unprotected access
public Object getTarget() {
        try {
            checkPermission(READ);
        } catch (AccessDeniedException e) {
            String rest = Stapler.getCurrentRequest().getRestOfPath();
            for (String name : ALWAYS_READABLE_PATHS) {
                if (rest.startsWith(name)) {
                    return this;
                }
            }
            for (String name : getUnprotectedRootActions()) {
                if (rest.startsWith("/" + name + "/") || rest.equals("/" + name)) {
                    return this;
                }
            }
            // TODO SlaveComputer.doSlaveAgentJnlp; there should be an annotation to request unprotected access
            if (rest.matches("/computer/[^/]+/slave-agent[.]jnlp")
                && "true".equals(Stapler.getCurrentRequest().getParameter("encrypt"))) {
                return this;
            }
            throw e;
        }
        return this;
    }
}
}
// TODO SlaveComputer.doSlaveAgentJnlp; there should be an annotation to request unprotected access
if (rest.matches("/computer/[^/]+/slave-agent[.]jnlp")
&& "true".equals(Stapler.getCurrentRequest().getParameter("encrypt"))) {
for (String name : ALWAYS_READABLE_PATHS) {
if (rest.startsWith(name)) {
return this;
}
}
for (String name : getUnprotectedRootActions()) {
if (rest.startsWith("/" + name + "/") || rest.equals("/" + name)) {
return this;
}
}
// TODO SlaveComputer.doSlaveAgentJnlp; there should be an annotation to request unprotected access
if (rest.matches("/computer/[^/]+/slave-agent[.]jnlp")
&& "true".equals(Stapler.getCurrentRequest().getParameter("encrypt"))) {
return this;
}
throw e;
}
return this;
}
public Object getTarget() {
try {
checkPermission(READ);
} catch (AccessDeniedException e) {
String rest = Stapler.getCurrentRequest().getRestOfPath();
for (String name : ALWAYS_READABLE_PATHS) {
if (rest.startsWith(name)) {
return this;
}
}
for (String name : getUnprotectedRootActions()) {
if (rest.startsWith("/" + name + "/") || rest.equals("/" + name)) {
return this;
}
}
// TODO SlaveComputer.doSlaveAgentJnlp; there should be an annotation to request unprotected access
if (rest.matches("/computer/[^/]+/slave-agent[.]jnlp")
&& "true".equals(Stapler.getCurrentRequest().getParameter("encrypt"))) {
return this;
}
throw e;
}
return this;
}