diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-18 12:08:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-18 12:08:21 +0300 |
commit | 1876696e875fa9de7e6344d760ac411057e628f5 (patch) | |
tree | 4befc9662c3b1bb9c40c0dadc527543ca26c9630 /lib | |
parent | c2f65d6e6f569415fe60e40aec5be6458d6a99bb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/pipeline/chain/validate/abilities.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/ci/pipeline/chain/validate/abilities.rb b/lib/gitlab/ci/pipeline/chain/validate/abilities.rb index 035167f1a74..bdd45687760 100644 --- a/lib/gitlab/ci/pipeline/chain/validate/abilities.rb +++ b/lib/gitlab/ci/pipeline/chain/validate/abilities.rb @@ -14,7 +14,7 @@ module Gitlab return error('Project is deleted!') end - unless project.builds_enabled? + unless builds_enabled? return error('Pipelines are disabled!') end @@ -37,6 +37,10 @@ module Gitlab can?(current_user, :create_pipeline, project) end + def builds_enabled? + project.builds_enabled? + end + def allowed_to_write_ref? access = Gitlab::UserAccess.new(current_user, container: project) |