Move start replication capability to replication plugin
Change-Id: I4b4bba8404cb057a6b7f70c38103ea0e7e514991
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user