commit | 46e9112a27e5a41f6703371ebf3ee57466343426 | [log] [tgz] |
---|---|---|
author | Paladox none <thomasmulhall410@yahoo.com> | Fri Oct 06 15:11:35 2017 +0000 |
committer | Paladox none <thomasmulhall410@yahoo.com> | Sat Oct 07 10:58:59 2017 +0000 |
tree | 98ae87b2774c861b5c9df610d90b2e319fc3d9c8 | |
parent | 2687d84d52e21dcc309bac078691a84e66a9eab6 [diff] |
Adapt to updated PermissionBackend#ForProject interface Change-Id: I8d55c8f6330f1e2184ff41e622aa84214224b173
Gerrit lib module to split the projects' space into virtual hosts similarly of what you would do with an HTTP Server and different domain names.
Build this module as it was a Gerrit plugin:
virtualhost
directory to Gerrit /plugins/virtualhost
bazel build plugins/virtualhost
virtualhost.jar
module is generated under /bazel-genfiles/plugins/virtualhost/
Copy virtualhost.jar
library to Gerrit /lib
and add the following two extra settings to gerrit.config
:
[gerrit] installModule = com.gerritforge.gerrit.modules.virtualhost.GuiceModule [httpd] filterClass = com.gerritforge.gerrit.modules.virtualhost.VirtualHostFilter
/etc/virtualhost.config contains the definition of the virtual hosts and the set of projects included.
Each server
section defines a virtual host and contains a set of projects included. Projects are defined using Gerrit ref-matching expressions and can be repeated multiple times to include multiple matchers.
Example to include all the projects starting with team1/
and the ones starting with the username:
[server "team1.mycompany.com"] projects = team1/* projects = ${username}/*
For all the other server names that are not defined and for SSH access, there is a special default section that lists of visible projects.
Example to include all the projects by default:
[default] projects = ^.*