Anyone who has write access to a project can approve merges, not just the people on the Approvers list

Summary

It seems everyone who has been granted access to a repository can approve MRs, not just Approvers. There's not much point in this feature if we can't limit who can approve MRs.

Steps to reproduce

Make a MR to master, ask your junior buddies to approve them for you (bypassing senior devs), then merge away

Example Project

I guess all of them?

What is the current bug behavior?

You can approve a MR even if you're not listed as an Approver.

What is the expected correct behavior?

Only Approvers can approve MRs.

Relevant logs and/or screenshots

N/A

Output of checks

Pretty sure this happens on gitlab.com as well, can post these if needed.

Results of GitLab environment info

Expand for output related to GitLab environment info
System information
System:
Proxy:          no
Current User:   git
Using RVM:      no
Ruby Version:   2.4.4p296
Gem Version:    2.7.6
Bundler Version:1.16.2
Rake Version:   12.3.1
Redis Version:  3.2.11
Git Version:    2.17.1
Sidekiq Version:5.1.3
Go Version:     unknown

GitLab information Version: 11.1.4-ee Revision: d17962f Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.8 URL: https://git.crfs.com HTTP Clone URL: https://git.crfs.com/some-group/some-project.git SSH Clone URL: git@git.crfs.com:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: yes Using Omniauth: no

GitLab Shell Version: 7.1.4 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check
Checking GitLab Shell ...

GitLab Shell version >= 7.1.4 ? ... OK (7.1.4) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 3/1 ... ok 3/2 ... ok 3/3 ... ok 3/4 ... ok 3/5 ... ok 6/6 ... ok 3/7 ... ok 3/8 ... ok 3/9 ... ok 3/10 ... ok 3/11 ... ok 3/12 ... ok 3/13 ... ok 3/14 ... ok 3/15 ... ok 23/16 ... ok 23/17 ... ok 23/18 ... ok 3/19 ... ok 3/20 ... ok 3/21 ... ok 3/22 ... ok 3/23 ... ok 3/24 ... ok 3/25 ... ok 3/26 ... ok 4/27 ... ok 3/28 ... ok 3/29 ... ok 22/30 ... ok 22/31 ... ok 3/32 ... repository is empty 3/33 ... ok 3/34 ... ok 3/35 ... ok 3/36 ... ok 3/37 ... ok 3/38 ... ok 3/39 ... ok 23/40 ... ok 3/41 ... ok 3/42 ... ok 3/43 ... ok 3/44 ... ok 3/45 ... ok 3/46 ... repository is empty 3/47 ... ok 3/48 ... ok 3/49 ... ok 3/50 ... ok 3/51 ... ok 6/52 ... ok 3/53 ... ok 25/54 ... ok 3/55 ... repository is empty 3/56 ... ok 3/57 ... ok 3/58 ... ok 3/59 ... ok 3/60 ... ok 3/61 ... ok 23/62 ... ok 3/63 ... ok 3/64 ... ok 3/65 ... ok 3/66 ... ok 3/67 ... ok 3/68 ... ok 3/69 ... ok 3/70 ... ok 3/71 ... ok 3/72 ... ok 3/73 ... ok 3/74 ... ok 3/75 ... ok 3/76 ... ok 3/77 ... ok 3/78 ... ok 3/79 ... ok 3/80 ... ok 3/81 ... ok 3/82 ... ok 5/83 ... ok 3/84 ... ok 25/85 ... ok 3/86 ... ok 3/87 ... ok 3/88 ... ok 3/89 ... ok 3/90 ... ok 3/91 ... ok 20/92 ... ok 3/93 ... ok 3/94 ... ok 3/95 ... ok 6/96 ... ok 5/97 ... ok 7/98 ... ok 7/99 ... ok 23/100 ... ok 23/101 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Reply by email is disabled in config/gitlab.yml Checking LDAP ...

Server: ldapmain not verifying SSL hostname of LDAPS server '194.12.8.202:8636' LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) [redacted]

Checking LDAP ... Finished

Checking GitLab ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 3/1 ... yes 3/2 ... yes 3/3 ... yes 3/4 ... yes 3/5 ... yes 6/6 ... yes 3/7 ... yes 3/8 ... yes 3/9 ... yes 3/10 ... yes 3/11 ... yes 3/12 ... yes 3/13 ... yes 3/14 ... yes 3/15 ... yes 23/16 ... yes 23/17 ... yes 23/18 ... yes 3/19 ... yes 3/20 ... yes 3/21 ... yes 3/22 ... yes 3/23 ... yes 3/24 ... yes 3/25 ... yes 3/26 ... yes 4/27 ... yes 3/28 ... yes 3/29 ... yes 22/30 ... yes 22/31 ... yes 3/32 ... yes 3/33 ... yes 3/34 ... yes 3/35 ... yes 3/36 ... yes 3/37 ... yes 3/38 ... yes 3/39 ... yes 23/40 ... yes 3/41 ... yes 3/42 ... yes 3/43 ... yes 3/44 ... yes 3/45 ... yes 3/46 ... yes 3/47 ... yes 3/48 ... yes 3/49 ... yes 3/50 ... yes 3/51 ... yes 6/52 ... yes 3/53 ... yes 25/54 ... yes 3/55 ... yes 3/56 ... yes 3/57 ... yes 3/58 ... yes 3/59 ... yes 3/60 ... yes 3/61 ... yes 23/62 ... yes 3/63 ... yes 3/64 ... yes 3/65 ... yes 3/66 ... yes 3/67 ... yes 3/68 ... yes 3/69 ... yes 3/70 ... yes 3/71 ... yes 3/72 ... yes 3/73 ... yes 3/74 ... yes 3/75 ... yes 3/76 ... yes 3/77 ... yes 3/78 ... yes 3/79 ... yes 3/80 ... yes 3/81 ... yes 3/82 ... yes 5/83 ... yes 3/84 ... yes 25/85 ... yes 3/86 ... yes 3/87 ... yes 3/88 ... yes 3/89 ... yes 3/90 ... yes 3/91 ... yes 20/92 ... yes 3/93 ... yes 3/94 ... yes 3/95 ... yes 6/96 ... yes 5/97 ... yes 7/98 ... yes 7/99 ... yes 23/100 ... yes 23/101 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.4) Git version >= 2.9.5 ? ... yes (2.17.1) Git user has default SSH configuration? ... yes Active users: ... 17 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)

Checking GitLab ... Finished

Possible fixes

Assignee Loading
Time tracking Loading