diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-05-10 17:13:05 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-05-11 16:20:11 +0300 |
commit | e0768a9bcb32e81fe18a77b21573969f45b47683 (patch) | |
tree | 00e91e901cad4c4ae0a616cdf7b555b5773e3aad /lib/gitlab/build_access.rb | |
parent | d801dd177483a8375f1656654ca3638c18550204 (diff) |
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.
Diffstat (limited to 'lib/gitlab/build_access.rb')
-rw-r--r-- | lib/gitlab/build_access.rb | 12 |
1 files changed, 12 insertions, 0 deletions
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 |