summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/git/GitblitReceivePackFactory.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-03-14 12:43:55 -0400
committerJames Moger <james.moger@gitblit.com>2014-04-10 18:58:08 -0400
commita8dd379bc357c64d1128bc6790e681e27387dbee (patch)
treec5556f7390cb986712aff9e1c9371242681b366c /src/main/java/com/gitblit/git/GitblitReceivePackFactory.java
parent44e2ee1d05a9d455ae60dd64058b31f006d551b7 (diff)
downloadgitblit-a8dd379bc357c64d1128bc6790e681e27387dbee.tar.gz
gitblit-a8dd379bc357c64d1128bc6790e681e27387dbee.zip
Rename & simplify SshSession->SshDaemonClient
Diffstat (limited to 'src/main/java/com/gitblit/git/GitblitReceivePackFactory.java')
-rw-r--r--src/main/java/com/gitblit/git/GitblitReceivePackFactory.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/com/gitblit/git/GitblitReceivePackFactory.java b/src/main/java/com/gitblit/git/GitblitReceivePackFactory.java
index b928d851..41e348ba 100644
--- a/src/main/java/com/gitblit/git/GitblitReceivePackFactory.java
+++ b/src/main/java/com/gitblit/git/GitblitReceivePackFactory.java
@@ -32,7 +32,7 @@ import com.gitblit.manager.IGitblit;
import com.gitblit.models.RepositoryModel;
import com.gitblit.models.UserModel;
import com.gitblit.transport.git.GitDaemonClient;
-import com.gitblit.transport.ssh.SshSession;
+import com.gitblit.transport.ssh.SshDaemonClient;
import com.gitblit.utils.HttpUtils;
import com.gitblit.utils.StringUtils;
@@ -90,13 +90,12 @@ public class GitblitReceivePackFactory<X> implements ReceivePackFactory<X> {
// set timeout from Git daemon
timeout = client.getDaemon().getTimeout();
- } else if (req instanceof SshSession) {
+ } else if (req instanceof SshDaemonClient) {
// SSH request is always authenticated
- SshSession client = (SshSession) req;
+ SshDaemonClient client = (SshDaemonClient) req;
repositoryName = client.getRepositoryName();
origin = client.getRemoteAddress().toString();
- String username = client.getRemoteUser();
- user = gitblit.getUserModel(username);
+ user = client.getUser();
}
boolean allowAnonymousPushes = settings.getBoolean(Keys.git.allowAnonymousPushes, false);