[JENKINS-73785] Restore ContextMenu#from with StaplerRequest/Response args (#9737)

Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
This commit is contained in:
Daniel BeckandDaniel Beck authored and GitHub committed 2024-09-16 18:36:50 -07:00
1 parent 2d2adefabd
commit de25478f3f
1 file changed
+4
@@ -299,6 +299,10 @@ public interface ModelObjectWithContextMenu extends ModelObject {
return from(self, request, response, "sidepanel");
}
public ContextMenu from(ModelObjectWithContextMenu self, StaplerRequest request, StaplerResponse response) throws JellyException, IOException {
return from(self, StaplerRequest.toStaplerRequest2(request), StaplerResponse.toStaplerResponse2(response), "sidepanel");
}
public ContextMenu from(ModelObjectWithContextMenu self, StaplerRequest2 request, StaplerResponse2 response, String view) throws JellyException, IOException {
WebApp webApp = WebApp.getCurrent();
final Script s = webApp.getMetaClass(self).getTearOff(JellyClassTearOff.class).findScript(view);