Allow admins to configure URL aliases

This allows to map plugin screens into the Gerrit URL namespace, e.g.:

  [urlAlias "MyPluginScreen"]
    match = /myscreen/(.*)
    token = /x/myplugin/myscreen/$1

This can also be used to replace Gerrit screens with plugin screens,
e.g. to replace change screen:

  [urlAlias "MyChangeScreen"]
    match = /c/(.*)
    token = /x/myplugin/c/$1

Defining URL aliases is similar to defining comment links. This is why
a similar representation in the gerrit.config was chosen.

Change-Id: Ie4a3b69703629051f7627eeb0c479dfc964f27ae
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2015-07-16 12:38:52 +02:00
parent 8586292fcf
commit fa0d494d11
8 changed files with 140 additions and 1 deletions

View File

@@ -1352,6 +1352,11 @@ entity. Not set if SSHD is disabled.
Information about the configuration from the
link:config-gerrit.html#suggest[suggest] section as link:#suggest-info[
SuggestInfo] entity.
|`url_aliases` |optional|
A map of URL aliases, where a regular expression for an URL token is
mapped to a target URL token. The target URL token can contain
placeholders for the groups matched by the regular expression: `$1` for
the first matched group, `$2` for the second matched group, etc.
|`user` ||
Information about the configuration from the
link:config-gerrit.html#user[user] section as link:#user-config-info[