Make ServerInfo accessible by plugins
The ServerInfo information provides information about the server configuration that is relevant for rendering the UI. UI plugins should be able to access it, e.g. they need the anonymous coward name to render user names the same way as Gerrit core does (use the anonymous coward name if the user has no full name). Change-Id: I272bcb96b5ce888007f6c4fa12f74ef750cc9862 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -17,6 +17,7 @@ package com.google.gerrit.plugin.client;
|
||||
import com.google.gerrit.client.GerritUiExtensionPoint;
|
||||
import com.google.gerrit.client.info.AccountInfo;
|
||||
import com.google.gerrit.client.info.AccountPreferencesInfo;
|
||||
import com.google.gerrit.client.info.ServerInfo;
|
||||
import com.google.gerrit.plugin.client.extension.Panel;
|
||||
import com.google.gerrit.plugin.client.screen.Screen;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
@@ -66,6 +67,10 @@ public final class Plugin extends JavaScriptObject {
|
||||
public final native void refreshUserPreferences()
|
||||
/*-{ return this.refreshUserPreferences() }-*/;
|
||||
|
||||
/** @return the server info */
|
||||
public final native ServerInfo getServerInfo()
|
||||
/*-{ return this.getServerInfo() }-*/;
|
||||
|
||||
/** @return the current user */
|
||||
public final native AccountInfo getCurrentUser()
|
||||
/*-{ return this.getCurrentUser() }-*/;
|
||||
|
Reference in New Issue
Block a user