fix error with grack
This commit is contained in:
parent
c72fd6f4e8
commit
5b0d149275
|
@ -11,9 +11,9 @@ module Grack
|
|||
return render_not_found if project.blank?
|
||||
|
||||
return ::Rack::Auth::Basic.new(@app) do |u, p|
|
||||
user = User.auth_by_token_or_login_pass(u, p) &&
|
||||
ability = ::Ability.new(user) && ability.can?(action, project) &&
|
||||
ENV['GL_ID'] = "user-#{user.id}" &&
|
||||
user = User.auth_by_token_or_login_pass(u, p) and
|
||||
ability = ::Ability.new(user) and ability.can?(action, project) and
|
||||
ENV['GL_ID'] = "user-#{user.id}" and
|
||||
ENV['GL_REPO_PATH'] = project.path
|
||||
end.call(env) unless project.public? && read? # need auth
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue