Commit 8e7230fd authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'master' into stable

parents d1564370 4bc64b55
v 3.0.1
- Fixed git over http
v 3.0.0
- Projects groups
- Web Editor
......
......@@ -53,6 +53,10 @@ module Grack
end
end
def can?(object, action, subject)
abilities.allowed?(object, action, subject)
end
def current_ref
if @env["HTTP_CONTENT_ENCODING"] =~ /gzip/
input = Zlib::GzipReader.new(@request.body).read
......@@ -63,5 +67,15 @@ module Grack
@request.body.rewind
/refs\/heads\/([\w-]+)/.match(input).to_a.first
end
protected
def abilities
@abilities ||= begin
abilities = Six.new
abilities << Ability
abilities
end
end
end# Auth
end# Grack
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment