Don't serve gwtjsonrpc endpoints if GWT UI isn't enabled

The old-style RPC endpoints are not a public interface and practically
speaking can't really be used except by GWT code; there's no point in
serving them if there is no GWT UI.

Change-Id: I5abe6ca48448d6eca3f47dbaf681c1553e637203
This commit is contained in:
Dave Borowitz
2018-06-07 13:12:37 -04:00
parent d3a779a8b4
commit 46c041fc90

View File

@@ -56,7 +56,9 @@ public class WebModule extends LifecycleModule {
installAuthModule();
if (options.enableMasterFeatures()) {
install(new UrlModule(options, authConfig));
install(new UiRpcModule());
if (options.enableGwtUi()) {
install(new UiRpcModule());
}
}
install(new GerritRequestModule());
install(new GitOverHttpServlet.Module(options.enableMasterFeatures()));