Disable peer IP in reflog record per default

Bug: Issue 10810
Change-Id: Ia7a04cdce0425989059b92131afd8c2f6030d10b
This commit is contained in:
David Ostrovsky
2021-04-17 14:06:12 +02:00
committed by David Ostrovsky
parent 411d9a544d
commit 9f200d29ea
5 changed files with 5 additions and 5 deletions

View File

@@ -2300,7 +2300,7 @@ should set this to the URL of their issue tracker, if necessary.
Record actual peer IP address in ref log entry for identified user.
Defaults to true.
Defaults to false.
[[gerrit.secureStoreClass]]gerrit.secureStoreClass::
+

View File

@@ -24,7 +24,7 @@ public class EnablePeerIPInReflogRecordProvider implements Provider<Boolean> {
@Inject
EnablePeerIPInReflogRecordProvider(@GerritServerConfig Config config) {
enablePeerIPInReflogRecord =
config.getBoolean("gerrit", null, "enablePeerIPInReflogRecord", true);
config.getBoolean("gerrit", null, "enablePeerIPInReflogRecord", false);
}
@Override

View File

@@ -66,6 +66,7 @@ public class ReflogIT extends AbstractDaemonTest {
}
@Test
@GerritConfig(name = "gerrit.enablePeerIPInReflogRecord", value = "true")
public void peerIPIncludedInReflogRecord() throws Exception {
PushOneCommit.Result r = createChange();
Change.Id id = r.getChange().getId();
@@ -85,7 +86,6 @@ public class ReflogIT extends AbstractDaemonTest {
}
@Test
@GerritConfig(name = "gerrit.enablePeerIPInReflogRecord", value = "false")
public void emaiIncludedInReflogRecord() throws Exception {
PushOneCommit.Result r = createChange();
Change.Id id = r.getChange().getId();

View File

@@ -81,7 +81,7 @@ public class IdentifiedUserTest {
protected void configure() {
bind(Boolean.class)
.annotatedWith(EnablePeerIPInReflogRecord.class)
.toInstance(Boolean.TRUE);
.toInstance(Boolean.FALSE);
bind(Config.class).annotatedWith(GerritServerConfig.class).toInstance(config);
bind(String.class)
.annotatedWith(AnonymousCowardName.class)

View File

@@ -154,7 +154,7 @@ public abstract class AbstractChangeNotesTest {
.toInstance("http://localhost:8080/");
bind(Boolean.class)
.annotatedWith(EnablePeerIPInReflogRecord.class)
.toInstance(Boolean.TRUE);
.toInstance(Boolean.FALSE);
bind(Realm.class).to(FakeRealm.class);
bind(GroupBackend.class).to(SystemGroupBackend.class).in(SINGLETON);
bind(AccountCache.class).toInstance(accountCache);