summaryrefslogtreecommitdiff
path: root/app/policies/merge_request_policy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/policies/merge_request_policy.rb')
-rw-r--r--app/policies/merge_request_policy.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/policies/merge_request_policy.rb b/app/policies/merge_request_policy.rb
index e2aca2a37d5..e5ac228b0ee 100644
--- a/app/policies/merge_request_policy.rb
+++ b/app/policies/merge_request_policy.rb
@@ -10,6 +10,10 @@ class MergeRequestPolicy < IssuablePolicy
# it would not be safe to prevent :create_note there, since
# note permissions are shared, and this would apply too broadly.
rule { ~can?(:read_merge_request) }.prevent :create_note
+
+ rule { can?(:update_merge_request) }.policy do
+ enable :approve_merge_request
+ end
end
MergeRequestPolicy.prepend_if_ee('EE::MergeRequestPolicy')