Make user preferences accessible by plugins
Add methods to the JavaScript API that allows plugins to get and refresh the preferences of the currently signed in user. Change-Id: Icabaf8188ccdd19b877856a23d292493cd50a215 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -16,6 +16,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.plugin.client.extension.Panel;
|
||||
import com.google.gerrit.plugin.client.screen.Screen;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
@@ -57,6 +58,14 @@ public final class Plugin extends JavaScriptObject {
|
||||
public final native void refreshMenuBar()
|
||||
/*-{ return this.refreshMenuBar() }-*/;
|
||||
|
||||
/** @return the preferences of the currently signed in user, the default preferences if not signed in */
|
||||
public final native AccountPreferencesInfo getUserPreferences()
|
||||
/*-{ return this.getUserPreferences() }-*/;
|
||||
|
||||
/** Refresh the user preferences of the current user. */
|
||||
public final native void refreshUserPreferences()
|
||||
/*-{ return this.refreshUserPreferences() }-*/;
|
||||
|
||||
/** @return the current user */
|
||||
public final native AccountInfo getCurrentUser()
|
||||
/*-{ return this.getCurrentUser() }-*/;
|
||||
|
Reference in New Issue
Block a user