Accept merge request clickable when MR not approved + results in error
Summary
When a MR has not enough approvers, and accepting the MR should thus not be possible, that button is still enabled and clickable. Upon clicking, a red message in the bar above shows up saying Something went wrong on our end.. Also the button changes to Merge in progress with the loading circle (see attached image) and stays like this. Upon refreshing the page, nothing has happened (i.e. the merge does not go through). Happens with chrome and safari (only ones I tried).
Steps to reproduce
- Create a merge request with approval count.
- Click on
Accept Merge Request
Expected behavior
The button is disabled when not meeting the acceptance criteria.
Actual behavior
The button is enabled, an error message is shown + the button mimics an actual merge
Relevant logs and/or screenshots
Output of checks
Results of GitLab application Check
I, [2017-01-27T18:44:26.914534 #998] INFO -- sentry: ** [Raven] Raven 2.0.2 ready to catch errors
Checking GitLab Shell ...
GitLab Shell version >= 4.1.1 ? ... OK (4.1.1)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
4/2 ... ok
4/3 ... ok
4/5 ... ok
4/7 ... ok
4/8 ... ok
4/9 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... 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: ...
4/2 ... yes
4/3 ... yes
4/5 ... yes
4/7 ... yes
4/8 ... yes
4/9 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.3)
Your git bin path is "/opt/gitlab/embedded/bin/git"
Git version >= 2.7.3 ? ... yes (2.10.2)
Active users: 13
Elasticsearch version 2.4.x? ... yes (2.4.1)
Elasticsearch has plugin delete-by-query installed? ... no
Checking GitLab ... Finished
Results of GitLab environment info
I, [2017-01-27T18:44:42.099550 #1034] INFO -- sentry: ** [Raven] Raven 2.0.2 ready to catch errors
System information
System: Debian 8.7
Current User: git
Using RVM: no
Ruby Version: 2.3.3p222
Gem Version: 2.6.6
Bundler Version:1.13.7
Rake Version: 10.5.0
Sidekiq Version:4.2.7
GitLab information
Version: 8.16.2-ee
Revision: a019470
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: PostgreSQL
DB Version: 9.6.1
URL: https://git.otainsight.com
HTTP Clone URL: [redacted]/some-group/some-project.git
SSH Clone URL: [redacted]:some-group/some-project.git
Elasticsearch: no
Geo: no
Using LDAP: no
Using Omniauth: yes
Omniauth Providers: google_oauth2, bitbucket
GitLab Shell
Version: 4.1.1
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git
