Move start replication capability to replication plugin

Change-Id: I4b4bba8404cb057a6b7f70c38103ea0e7e514991
This commit is contained in:
David Ostrovsky
2013-06-16 17:50:35 +02:00
parent d22a993e37
commit 99fc25331a
8 changed files with 1 additions and 32 deletions

View File

@@ -139,12 +139,6 @@ public class CapabilityControl {
return canPerform(GlobalCapability.ACCESS_DATABASE);
}
/** @return true if the user can force replication to any configured destination. */
public boolean canStartReplication() {
return canPerform(GlobalCapability.START_REPLICATION)
|| canAdministrateServer();
}
/** @return true if the user can stream Gerrit events. */
public boolean canStreamEvents() {
return canPerform(GlobalCapability.STREAM_EVENTS)

View File

@@ -23,7 +23,6 @@ import static com.google.gerrit.common.data.GlobalCapability.FLUSH_CACHES;
import static com.google.gerrit.common.data.GlobalCapability.KILL_TASK;
import static com.google.gerrit.common.data.GlobalCapability.PRIORITY;
import static com.google.gerrit.common.data.GlobalCapability.RUN_GC;
import static com.google.gerrit.common.data.GlobalCapability.START_REPLICATION;
import static com.google.gerrit.common.data.GlobalCapability.STREAM_EVENTS;
import static com.google.gerrit.common.data.GlobalCapability.VIEW_CACHES;
import static com.google.gerrit.common.data.GlobalCapability.VIEW_CONNECTIONS;
@@ -117,7 +116,6 @@ class GetCapabilities implements RestReadView<AccountResource> {
have.put(VIEW_CONNECTIONS, cc.canViewConnections());
have.put(VIEW_QUEUE, cc.canViewQueue());
have.put(RUN_GC, cc.canRunGC());
have.put(START_REPLICATION, cc.canStartReplication());
have.put(STREAM_EVENTS, cc.canStreamEvents());
have.put(ACCESS_DATABASE, cc.canAccessDatabase());

View File

@@ -34,7 +34,6 @@ public class CapabilityConstants extends TranslationBundle {
public String queryLimit;
public String runAs;
public String runGC;
public String startReplication;
public String streamEvents;
public String viewCaches;
public String viewConnections;

View File

@@ -10,7 +10,6 @@ priority = Priority
queryLimit = Query Limit
runAs = Run As
runGC = Run Garbage Collection
startReplication = Start Replication
streamEvents = Stream Events
viewCaches = View Caches
viewConnections = View Connections