Move start replication capability to replication plugin
Change-Id: I4b4bba8404cb057a6b7f70c38103ea0e7e514991
This commit is contained in:
parent
d22a993e37
commit
99fc25331a
@ -1297,14 +1297,6 @@ Allow users to run the Git garbage collection for the repositories of
|
||||
all projects.
|
||||
|
||||
|
||||
[[capability_startReplication]]
|
||||
Start Replication
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Allow access to execute `replication start` command, if the
|
||||
replication plugin is installed on the server.
|
||||
|
||||
|
||||
[[capability_streamEvents]]
|
||||
Stream Events
|
||||
~~~~~~~~~~~~~
|
||||
|
@ -658,8 +658,7 @@ Administrator that has authenticated with digest authentication:
|
||||
"flushCaches": true,
|
||||
"viewConnections": true,
|
||||
"viewQueue": true,
|
||||
"runGC": true,
|
||||
"startReplication": true
|
||||
"runGC": true
|
||||
}
|
||||
----
|
||||
|
||||
@ -1059,9 +1058,6 @@ link:access-control.html#capability_viewQueue[View Queue] capability.
|
||||
|`runGC` |not set if `false`|Whether the user has the
|
||||
link:access-control.html#capability_runGC[Run Garbage Collection]
|
||||
capability.
|
||||
|`startReplication` |not set if `false`|Whether the user has the
|
||||
link:access-control.html#capability_startReplication[Start Replication]
|
||||
capability.
|
||||
|=================================
|
||||
|
||||
[[diff-preferences-info]]
|
||||
|
@ -112,11 +112,6 @@ The entries in the map are sorted by capability ID.
|
||||
"id": "runGC",
|
||||
"name": "Run Garbage Collection"
|
||||
},
|
||||
"startReplication": {
|
||||
"kind": "gerritcodereview#capability",
|
||||
"id": "startReplication",
|
||||
"name": "Start Replication"
|
||||
},
|
||||
"streamEvents": {
|
||||
"kind": "gerritcodereview#capability",
|
||||
"id": "streamEvents",
|
||||
|
@ -76,9 +76,6 @@ public class GlobalCapability {
|
||||
/** Can run the Git garbage collection. */
|
||||
public static final String RUN_GC = "runGC";
|
||||
|
||||
/** Forcefully restart replication to any configured destination. */
|
||||
public static final String START_REPLICATION = "startReplication";
|
||||
|
||||
/** Can perform streaming of Gerrit events. */
|
||||
public static final String STREAM_EVENTS = "streamEvents";
|
||||
|
||||
@ -108,7 +105,6 @@ public class GlobalCapability {
|
||||
NAMES_ALL.add(QUERY_LIMIT);
|
||||
NAMES_ALL.add(RUN_AS);
|
||||
NAMES_ALL.add(RUN_GC);
|
||||
NAMES_ALL.add(START_REPLICATION);
|
||||
NAMES_ALL.add(STREAM_EVENTS);
|
||||
NAMES_ALL.add(VIEW_CACHES);
|
||||
NAMES_ALL.add(VIEW_CONNECTIONS);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user