From 145f6fd0b9bb2428ee9f5445efe7cb0b91ca8712 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Tue, 28 Feb 2017 13:37:35 -0800 Subject: [PATCH] protect git access through the policy infra --- lib/gitlab/user_access.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gitlab/user_access.rb b/lib/gitlab/user_access.rb index 6ce9b229294..3078b134bb3 100644 --- a/lib/gitlab/user_access.rb +++ b/lib/gitlab/user_access.rb @@ -63,7 +63,7 @@ module Gitlab private def no_user_or_blocked? - user.nil? || user.blocked? + user.nil? || !user.can?(:access_git) end end end