Commit 502d4014 authored by Mark Chao's avatar Mark Chao

Fix MR approval form showing in free plan

`requires_approve?` went through several iterations,
earliest one implies license by checking `approvals_required.nonzero?`.
This was however set to true so caused EE specific UI to appear by
mistake.
parent 195940f9
......@@ -3,7 +3,7 @@
- form = local_assigns.fetch(:form)
- return unless issuable.is_a?(MergeRequest)
- return unless presenter.requires_approve?
- return unless @project.feature_available?(:merge_request_approvers)
- can_update_approvers = can?(current_user, :update_approvers, issuable)
......
---
title: Fix approval-related UI showing up in free plan
merge_request: 9819
author:
type: fixed
......@@ -15,7 +15,6 @@ describe 'shared/issuable/_approvals.html.haml' do
allow(view).to receive(:current_user).and_return(user)
allow(form).to receive(:label)
allow(form).to receive(:number_field)
allow(merge_request).to receive(:requires_approve?).and_return(true)
allow(MergeRequestApproverPresenter).to receive(:new).and_return(approver_presenter)
assign(:project, project)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment