| | |
| | | import com.gitblit.manager.IAuthenticationManager; |
| | | import com.gitblit.models.UserModel; |
| | | import com.gitblit.transport.git.GitDaemonClient; |
| | | import com.gitblit.transport.ssh.SshSession; |
| | | |
| | | /** |
| | | * The upload pack factory creates an upload pack which controls what refs are |
| | |
| | | GitDaemonClient client = (GitDaemonClient) req; |
| | | // set timeout from Git daemon |
| | | timeout = client.getDaemon().getTimeout(); |
| | | } else if (req instanceof SshSession) { |
| | | // SSH request is always authenticated |
| | | SshSession client = (SshSession) req; |
| | | user = authenticationManager.authenticate(client); |
| | | if (user == null) { |
| | | throw new ServiceNotAuthorizedException(); |
| | | } |
| | | } |
| | | |
| | | UploadPack up = new UploadPack(db); |