Remove removed from project user as approver

Summary

When users are removed from project (or group with this project), and even blocked, remove them from Approvers list.

Steps to reproduce

  • Create new project
  • Add a user UserA to the project
  • Add UserA as an approver and set required approvals to 1
  • Create a Merge Request
  • Notice that UserA is required to approve it
  • Remove UserA membership for the project
  • Notice that UserA's approval is still required for the MR before it can be merged

Example Project

  • issue-reproduce/remove-existing-approver!1

What is the current bug behavior?

It's still default approver. And, if I'm right, approver of existing MRs.

What is the expected correct behavior?

Removed user should not be approver.

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

  • reproduced on GitLab.com v11.5.2

Results of GitLab application Check

  • reproduced on GitLab.com v11.5.2

Possible fixes

Edited Dec 06, 2018 by Mark Fletcher
Assignee Loading
Time tracking Loading