From 5b0d149275ea27e4bf6b1381584c6fffee67e7a6 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Wed, 11 Mar 2015 15:53:41 +0500 Subject: [PATCH] fix error with grack --- lib/plugins/grack/auth.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/plugins/grack/auth.rb b/lib/plugins/grack/auth.rb index cafdc4cbd..d53847412 100644 --- a/lib/plugins/grack/auth.rb +++ b/lib/plugins/grack/auth.rb @@ -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