in src/main/java/com/googlesource/gerrit/plugins/manager/FirstWebLoginListener.java [53:67]
public void onLogin(IdentifiedUser user, HttpServletRequest request, HttpServletResponse response)
throws IOException {
if (pluginLoader.isRemoteAdminEnabled() && config.canAdministerPlugins()) {
Path firstLoginFile = pluginData.resolve("firstLogin." + user.getAccountId().get());
if (!firstLoginFile.toFile().exists()) {
response.sendRedirect(pluginUrlPath + "static/intro.html");
String timestamp =
DateTimeFormatter.ofPattern("EEE MMM dd HH:mm:ss zzz yyyy")
.withZone(ZoneId.systemDefault())
.format(Instant.now());
Files.write(firstLoginFile, timestamp.getBytes(UTF_8), StandardOpenOption.CREATE);
}
}
}