Move bindings for cache related REST endpoints into own module
This allows Shawn to skip this module in his build so that administrator users on his servers cannot invoke them. Change-Id: I9c852d3f22b820f24f3fcab8481feb1a63f2778c Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
|
||||
package com.google.gerrit.server.config;
|
||||
|
||||
import static com.google.gerrit.server.config.CacheResource.CACHE_KIND;
|
||||
import static com.google.gerrit.server.config.CapabilityResource.CAPABILITY_KIND;
|
||||
import static com.google.gerrit.server.config.ConfigResource.CONFIG_KIND;
|
||||
import static com.google.gerrit.server.config.TopMenuResource.TOP_MENU_KIND;
|
||||
@@ -25,12 +24,9 @@ import com.google.gerrit.extensions.restapi.RestApiModule;
|
||||
public class Module extends RestApiModule {
|
||||
@Override
|
||||
protected void configure() {
|
||||
DynamicMap.mapOf(binder(), CACHE_KIND);
|
||||
DynamicMap.mapOf(binder(), CAPABILITY_KIND);
|
||||
DynamicMap.mapOf(binder(), CONFIG_KIND);
|
||||
DynamicMap.mapOf(binder(), TOP_MENU_KIND);
|
||||
child(CONFIG_KIND, "caches").to(CachesCollection.class);
|
||||
get(CACHE_KIND).to(GetCache.class);
|
||||
child(CONFIG_KIND, "capabilities").to(CapabilitiesCollection.class);
|
||||
child(CONFIG_KIND, "top-menus").to(TopMenuCollection.class);
|
||||
get(CONFIG_KIND, "version").to(GetVersion.class);
|
||||
|
||||
Reference in New Issue
Block a user