Introduce StreamEvents capability
This change introduces new global capability for streaming Gerrit events. Only admins and users with this capability are able to run gerrit stream-events. Change-Id: I0a8a110758b0ac43969e5b8ae799b9b89db318e2 Signed-off-by: Ed Bartosh <bartosh@gmail.com> Signed-off-by: Alexander Kanevskiy <kad@blackcatlinux.com>
This commit is contained in:
committed by
Alexander D. Kanevskiy
parent
72b714137b
commit
d168b81bbb
@@ -142,6 +142,12 @@ public class CapabilityControl {
|
||||
|| canAdministrateServer();
|
||||
}
|
||||
|
||||
/** @return true if the user can stream Gerrit events. */
|
||||
public boolean canStreamEvents() {
|
||||
return canPerform(GlobalCapability.STREAM_EVENTS)
|
||||
|| canAdministrateServer();
|
||||
}
|
||||
|
||||
/** @return true if the user can run the Git garbage collection. */
|
||||
public boolean canRunGC() {
|
||||
return canPerform(GlobalCapability.RUN_GC)
|
||||
|
||||
Reference in New Issue
Block a user