Merge branch 'master' into stable
This commit is contained in:
commit
8e7230fd99
3 changed files with 18 additions and 1 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
v 3.0.1
|
||||||
|
- Fixed git over http
|
||||||
|
|
||||||
v 3.0.0
|
v 3.0.0
|
||||||
- Projects groups
|
- Projects groups
|
||||||
- Web Editor
|
- Web Editor
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
3.0.0
|
3.0.1
|
||||||
|
|
|
@ -53,6 +53,10 @@ module Grack
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def can?(object, action, subject)
|
||||||
|
abilities.allowed?(object, action, subject)
|
||||||
|
end
|
||||||
|
|
||||||
def current_ref
|
def current_ref
|
||||||
if @env["HTTP_CONTENT_ENCODING"] =~ /gzip/
|
if @env["HTTP_CONTENT_ENCODING"] =~ /gzip/
|
||||||
input = Zlib::GzipReader.new(@request.body).read
|
input = Zlib::GzipReader.new(@request.body).read
|
||||||
|
@ -63,5 +67,15 @@ module Grack
|
||||||
@request.body.rewind
|
@request.body.rewind
|
||||||
/refs\/heads\/([\w-]+)/.match(input).to_a.first
|
/refs\/heads\/([\w-]+)/.match(input).to_a.first
|
||||||
end
|
end
|
||||||
|
|
||||||
|
protected
|
||||||
|
|
||||||
|
def abilities
|
||||||
|
@abilities ||= begin
|
||||||
|
abilities = Six.new
|
||||||
|
abilities << Ability
|
||||||
|
abilities
|
||||||
|
end
|
||||||
|
end
|
||||||
end# Auth
|
end# Auth
|
||||||
end# Grack
|
end# Grack
|
||||||
|
|
Loading…
Add table
Reference in a new issue