summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-04-17 22:15:21 -0400
committerJames Moger <james.moger@gitblit.com>2014-04-17 23:08:07 -0400
commit7c95e9cf122b933823d7743c9b7e91f065bd59be (patch)
treecf01327a12fdcea9b7caded86794b3988d45deea /src
parent80c3ef7b8fd0daee7e85beb6b10f8a7a40efb3de (diff)
downloadgitblit-7c95e9cf122b933823d7743c9b7e91f065bd59be.tar.gz
gitblit-7c95e9cf122b933823d7743c9b7e91f065bd59be.zip
[findbugs] Fix user assignment for clone permission check in repository resolver
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/gitblit/git/RepositoryResolver.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/git/RepositoryResolver.java b/src/main/java/com/gitblit/git/RepositoryResolver.java
index cc13144e..10336373 100644
--- a/src/main/java/com/gitblit/git/RepositoryResolver.java
+++ b/src/main/java/com/gitblit/git/RepositoryResolver.java
@@ -83,8 +83,8 @@ public class RepositoryResolver<X> extends FileResolver<X> {
protected boolean isExportOk(X req, String repositoryName, Repository db) throws IOException {
RepositoryModel model = gitblit.getRepositoryModel(repositoryName);
+ UserModel user = UserModel.ANONYMOUS;
String scheme = null;
- UserModel user = null;
String origin = null;
if (req instanceof GitDaemonClient) {
@@ -93,7 +93,6 @@ public class RepositoryResolver<X> extends FileResolver<X> {
GitDaemonClient client = (GitDaemonClient) req;
scheme = "git";
origin = client.getRemoteAddress().toString();
- user = UserModel.ANONYMOUS;
} else if (req instanceof HttpServletRequest) {
// http/https request
HttpServletRequest client = (HttpServletRequest) req;