From e3952516c835351e4e357c5ef3ee913ec78353d3 Mon Sep 17 00:00:00 2001
From: Simon Harrer <simon.harrer@gmail.com>
Date: Thu, 24 Oct 2013 05:50:04 -0400
Subject: [PATCH] Use equals to compare strings instead of ==
---
src/main/java/com/gitblit/git/GitblitReceivePackFactory.java | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/gitblit/git/GitblitReceivePackFactory.java b/src/main/java/com/gitblit/git/GitblitReceivePackFactory.java
index b9eb8a6..b2862f0 100644
--- a/src/main/java/com/gitblit/git/GitblitReceivePackFactory.java
+++ b/src/main/java/com/gitblit/git/GitblitReceivePackFactory.java
@@ -27,6 +27,7 @@
import org.slf4j.LoggerFactory;
import com.gitblit.GitBlit;
+import com.gitblit.Keys;
import com.gitblit.models.RepositoryModel;
import com.gitblit.models.UserModel;
import com.gitblit.utils.HttpUtils;
@@ -80,8 +81,7 @@
timeout = client.getDaemon().getTimeout();
}
- // TODO make this a setting
- boolean allowAnonymousPushes = true;
+ boolean allowAnonymousPushes = GitBlit.getBoolean(Keys.git.allowAnonymousPushes, false);
if (!allowAnonymousPushes && UserModel.ANONYMOUS.equals(user)) {
// prohibit anonymous pushes
throw new ServiceNotEnabledException();
--
Gitblit v1.9.1