From e0768a9bcb32e81fe18a77b21573969f45b47683 Mon Sep 17 00:00:00 2001 From: Bob Van Landuyt Date: Thu, 10 May 2018 16:13:05 +0200 Subject: Allow triggered builds git access Allow builds that have been triggered by a user before terms were enforced access to git. That way the builds can complete as usual. --- lib/gitlab/build_access.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/gitlab/build_access.rb (limited to 'lib/gitlab/build_access.rb') diff --git a/lib/gitlab/build_access.rb b/lib/gitlab/build_access.rb new file mode 100644 index 00000000000..08a8f846ca5 --- /dev/null +++ b/lib/gitlab/build_access.rb @@ -0,0 +1,12 @@ +module Gitlab + class BuildAccess < UserAccess + attr_accessor :user, :project + + # This bypasses the `can?(:access_git)`-check we normally do in `UserAccess` + # for CI. That way if a user was able to trigger a pipeline, then the + # build is allowed to clone the project. + def can_access_git? + true + end + end +end -- cgit v1.2.3