commit | 5078bbb61e0de639130ec3652fe5b1f04b5e2666 | [log] [tgz] |
---|---|---|
author | James Hartig <fastest963@gmail.com> | Wed May 29 15:09:39 2019 -0400 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Sat Jun 01 01:42:18 2019 +0100 |
tree | cb050656f706f436d5177dc64953aa9743ecfb3f | |
parent | f681b01839e5a80ba6ac3d1d0da4cf3163a439a2 [diff] |
Adapt to Gerrit v3.0 backend and test APIs Restore the module functionality by adapting to the new permission backend APIs and acceptance test framework in Gerrit v3.0. Change-Id: I823e1b399fb4a3daacd639068fb212355f774a55
Gerrit lib module to allow filtering out refs in the Git advertizing protocol phase.
Build this module as it was a Gerrit plugin:
git-refs-filter
directory to Gerrit /plugins/git-refs-filter
bazel build plugins/git-refs-filter
bazel test plugins/git-refs-filter:git_refs_filter_tests
git-refs-filter.jar
module is generated under /bazel-genfiles/plugins/git-refs-filter/
Copy git-refs-filter.jar
library to Gerrit /lib
and add the following one extra settings to gerrit.config
:
[gerrit] installModule = com.googlesource.gerrit.modules.gitrefsfilter.RefsFilterModule
The refsfilter module defines a new global capability called “Filter out closed changes refs”. By default the capability isn't assigned to any user or group, thus the module installation has no side effects.
To enable a group of users of getting a “filtered list” of refs (e.g. CI jobs):
NOTE Gerrit makes a super-simplified ACL evaluation if all the projects are globally readable (e.g. project has a READ rule to refs/*). To enable the closed changes filtering you need to disable any global read rule for the group that needs refs filtering.