Adapats plugin to gerrit master
Change-Id: If04991da1761fb4afa7ba9e16b92bcea73d47e86
diff --git a/src/main/java/com/googlesource/gerrit/plugins/serverconfig/HideFromNonAdmins.java b/src/main/java/com/googlesource/gerrit/plugins/serverconfig/HideFromNonAdmins.java
index 269d68f..631060f 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/serverconfig/HideFromNonAdmins.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/serverconfig/HideFromNonAdmins.java
@@ -52,7 +52,7 @@
public void doFilter(ServletRequest req, ServletResponse rsp,
FilterChain chain) throws IOException, ServletException {
try {
- permissionBackend.user(user).check(GlobalPermission.ADMINISTRATE_SERVER);
+ permissionBackend.user(user.get()).check(GlobalPermission.ADMINISTRATE_SERVER);
} catch (AuthException | PermissionBackendException e) {
((HttpServletResponse) rsp).sendError(HttpServletResponse.SC_NOT_FOUND,
"Not Found");
diff --git a/src/main/java/com/googlesource/gerrit/plugins/serverconfig/ServerConfigServlet.java b/src/main/java/com/googlesource/gerrit/plugins/serverconfig/ServerConfigServlet.java
index 63ad074..5ccbc9d 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/serverconfig/ServerConfigServlet.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/serverconfig/ServerConfigServlet.java
@@ -21,7 +21,6 @@
import com.google.common.collect.Multimap;
import com.google.common.collect.MultimapBuilder;
import com.google.common.io.ByteStreams;
-import com.google.gerrit.common.TimeUtil;
import com.google.gerrit.extensions.annotations.PluginName;
import com.google.gerrit.extensions.registration.DynamicItem;
import com.google.gerrit.httpd.WebSession;
@@ -29,6 +28,7 @@
import com.google.gerrit.server.audit.AuditEvent;
import com.google.gerrit.server.audit.AuditService;
import com.google.gerrit.server.config.SitePaths;
+import com.google.gerrit.server.util.time.TimeUtil;
import com.google.inject.Inject;
import com.google.inject.Singleton;