Commit 8e7230fd99bc4e29abddf966da33d8458ef9fd1a

Authored by Dmitriy Zaporozhets
2 parents d1564370 4bc64b55

Merge branch 'master' into stable

CHANGELOG
  1 +v 3.0.1
  2 + - Fixed git over http
  3 +
1 4 v 3.0.0
2 5 - Projects groups
3 6 - Web Editor
... ...
VERSION
1   -3.0.0
  1 +3.0.1
... ...
lib/gitlab/backend/grack_auth.rb
... ... @@ -53,6 +53,10 @@ module Grack
53 53 end
54 54 end
55 55  
  56 + def can?(object, action, subject)
  57 + abilities.allowed?(object, action, subject)
  58 + end
  59 +
56 60 def current_ref
57 61 if @env["HTTP_CONTENT_ENCODING"] =~ /gzip/
58 62 input = Zlib::GzipReader.new(@request.body).read
... ... @@ -63,5 +67,15 @@ module Grack
63 67 @request.body.rewind
64 68 /refs\/heads\/([\w-]+)/.match(input).to_a.first
65 69 end
  70 +
  71 + protected
  72 +
  73 + def abilities
  74 + @abilities ||= begin
  75 + abilities = Six.new
  76 + abilities << Ability
  77 + abilities
  78 + end
  79 + end
66 80 end# Auth
67 81 end# Grack
... ...