| | |
| | | public UploadPack create(X req, Repository db) |
| | | throws ServiceNotEnabledException, ServiceNotAuthorizedException { |
| | | |
| | | UserModel user = UserModel.ANONYMOUS; |
| | | int timeout = 0; |
| | | |
| | | if (req instanceof HttpServletRequest) { |
| | | // http/https request may or may not be authenticated |
| | | HttpServletRequest client = (HttpServletRequest) req; |
| | | user = authenticationManager.authenticate(client); |
| | | if (user == null) { |
| | | user = UserModel.ANONYMOUS; |
| | | } |
| | | } else if (req instanceof GitDaemonClient) { |
| | | if (req instanceof GitDaemonClient) { |
| | | // git daemon request is always anonymous |
| | | GitDaemonClient client = (GitDaemonClient) req; |
| | | // set timeout from Git daemon |