Add REST endpoint to get info about server configuration
Some of the Gerrit configuration parameters can now be accessed by GET /config/server/info This REST endpoint can also be used anonymously. For now the REST endpoint returns only a very limited set of configuration parameters, which are needed by the Gerrit Mylyn Connector. The result contains information about: - auth type, editable account fields, if contributor agreements are used - contact store - download schemes, commands and archive formats - All-Projects and All-Users project names At the moment the Mylyn Gerrit Connector retrieves this information by parsing the config from the HostPageData which is sent to the client. This is an internal data structure which is used to exchange information between Gerrit server and Gerrit WebUI. It's not an API and third-party tools should not rely on it. As a result the Mylyn Gerrit Connector is currently broken for Gerrit 2.11 and newer. Provide the Mylyn Gerrit Connector team a stable API that provides them the information they need so that future breakages can be avoided. See Eclipse Bugzilla issue 465132 [1] for further details. The structure of the returned JSON correlates to the structure in the gerrit.config file. [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=465132 Change-Id: Iac4be762bff971403438aa84923d9f0e11883366 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -24,6 +24,9 @@ public interface Realm {
|
||||
/** Can the end-user modify this field of their own account? */
|
||||
public boolean allowsEdit(Account.FieldName field);
|
||||
|
||||
/** Returns the account fields that the end-user can modify. */
|
||||
public Set<Account.FieldName> getEditableFields();
|
||||
|
||||
public AuthRequest authenticate(AuthRequest who) throws AccountException;
|
||||
|
||||
public AuthRequest link(ReviewDb db, Account.Id to, AuthRequest who)
|
||||
|
Reference in New Issue
Block a user