| | |
| | | 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; |
| | |
| | | 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(); |