title: How does GitLab check for Grack HTTPS push permissions?
body: <p>I want develop some feature for GitLab and add it to open source repo.</p>
  
  <p>DESCRIPTION:
  When user make push, GitLab checks that all emails from commits should be present in database.</p>
  
  <p>I think to add some validation method to <a href="https://github.com/gitlabhq/gitlabhq/blob/master/lib/gitlab/git_access.rb" rel="nofollow">https://github.com/gitlabhq/gitlabhq/blob/master/lib/gitlab/git_access.rb</a> this class, but this validation doesn't call when user push some changes (e.g. git push origin master).</p>
  
  <p>I've researched routing and found next:
  <a href="https://github.com/gitlabhq/gitlabhq/blob/master/config/routes.rb#L24" rel="nofollow">https://github.com/gitlabhq/gitlabhq/blob/master/config/routes.rb#L24</a></p>
  
  <pre><code>mount Grack::Bundle.new({
    git_path:     Gitlab.config.git.bin_path,
    project_root: Gitlab.config.gitlab_shell.repos_path,
    upload_pack:  Gitlab.config.gitlab_shell.upload_pack,
    receive_pack: Gitlab.config.gitlab_shell.receive_pack
  }), at: '/', constraints: lambda { |request| /[-\/\w\.]+\.git\//.match(request.path_info) }, via: [:get, :post]
  </code></pre>
  
  <p>Grack mounted to provide access for git http protocol. And Gitlab has hook for authenticate for Grack /lib/gitlab/backend/grack_auth.rb#L79</p>
  
  <p>But I debugged method <code>authorized_request?</code> and have got that this validation doesn't call too.</p>
  
  <p>QUESTION: what class in GitLab validates pushes? Or probably this feature impossible to implement?</p>