diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2018-05-15 11:18:22 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-05-15 11:18:22 +0300 |
commit | 21588f180c394cf189b19693413dce932ff67141 (patch) | |
tree | 2328f3fbd6aaa92ec80eb3a778409d282cf72274 /app/policies/project_policy.rb | |
parent | e8442595746fe529305c70a07c1066bec52ccd31 (diff) |
Enable update_(build|pipeline) for maintainers
Diffstat (limited to 'app/policies/project_policy.rb')
-rw-r--r-- | app/policies/project_policy.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb index 5759b1a376f..99a0d7118f2 100644 --- a/app/policies/project_policy.rb +++ b/app/policies/project_policy.rb @@ -76,7 +76,7 @@ class ProjectPolicy < BasePolicy condition(:request_access_enabled, scope: :subject, score: 0) { project.request_access_enabled } desc "Has merge requests allowing pushes to user" - condition(:has_merge_requests_allowing_pushes, scope: :subject) do + condition(:has_merge_requests_allowing_pushes) do project.merge_requests_allowing_push_to_user(user).any? end @@ -354,9 +354,7 @@ class ProjectPolicy < BasePolicy # to run pipelines for the branches they have access to. rule { can?(:public_access) & has_merge_requests_allowing_pushes }.policy do enable :create_build - enable :update_build enable :create_pipeline - enable :update_pipeline end rule do |