Commit 35d8dbda authored by Mike Greiling's avatar Mike Greiling

exclude issuable author from approvers autocomplete list

parent f0e4beae
......@@ -4,6 +4,7 @@
- return unless issuable.is_a?(MergeRequest)
- return unless issuable.requires_approve?
- ineligible_approver = issuable.author || current_user
- can_update_approvers = can?(current_user, :update_approvers, issuable)
.form-group
......@@ -11,7 +12,7 @@
Approvers
.col-sm-10
- if can_update_approvers
= users_select_tag("merge_request[approver_ids]", multiple: true, class: 'input-large', email_user: true, skip_users: issuable.all_approvers_including_groups, project: issuable.target_project)
= users_select_tag("merge_request[approver_ids]", multiple: true, class: 'input-large', email_user: true, skip_users: issuable.all_approvers_including_groups << ineligible_approver, project: issuable.target_project)
.help-block
This merge request must be approved by these users.
You can override the project settings by setting your own list of approvers.
......
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