Developer able to merge into Protect Branch
Summary
One project member (asantora) listed as a Developer is able to merge into a protected branch. They also appear to be listed differently from other developers. This is because the project is shared with a group and in that group they have Master privileges. However, in the project they're designated as a Developer. The Master privileges seem to be overriding the Developer privileges and are not immediately obvious. This was not an issue prior to upgrading from Gitlab CE 9.3.2 to 9.3.8.
Steps to reproduce
Create a group and add the user to the group as a Master. Create a project and add the group to the project. Add that user to the project as a Developer. Set a branch as protected so that only Masters can merge into it. Any user create a new branch and create a merge request into the protected branch. The user with Master privileges in the group, but Developer privileges in the project may click Merge. Branch is merged without a visible project Master approving the merge request.
Example Project
What is the current bug behavior?
A user listed as a Developer in a project can merge into protected branches.
What is the expected correct behavior?
Only Master users should be able to merge into protected branches.
Relevant logs and/or screenshots
- http://i63.tinypic.com/24g59o0.png
- http://i66.tinypic.com/2nscsps.png
- http://i64.tinypic.com/316lwz5.png
- http://i66.tinypic.com/2w7r40k.png
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: 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 Redis Version: 3.2.5 Git Version: 2.13.0 Sidekiq Version:5.0.0 Go Version: unknownGitLab information Version: 9.3.8 Revision: 63d383e Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://[redacted] HTTP Clone URL: https://[redacted]/some-group/some-project.git SSH Clone URL: git@[redacted]:some-group/some-project.git Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 5.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
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...GitLab Shell version >= 5.1.1 ? ... OK (5.1.1) 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: ... 4/2 ... ok 29/3 ... ok 29/5 ... ok 29/6 ... ok 29/7 ... ok 29/8 ... ok 29/9 ... ok 29/10 ... ok 29/11 ... ok 29/13 ... ok 4/15 ... ok 4/18 ... ok 4/19 ... ok 4/20 ... ok 4/21 ... ok 4/22 ... ok 4/23 ... ok 4/24 ... ok 4/25 ... ok 4/26 ... ok 4/27 ... ok 2/31 ... ok 4/36 ... ok 29/37 ... ok 8/38 ... ok 21/39 ... ok 29/41 ... ok 12/53 ... ok 7/55 ... ok 7/56 ... ok 7/57 ... ok 6/61 ... ok 8/64 ... ok 12/67 ... ok 8/68 ... ok 8/69 ... ok 8/70 ... ok 8/72 ... ok 21/73 ... ok 29/74 ... ok 8/75 ... ok 2/77 ... ok 21/78 ... ok 7/79 ... ok 29/80 ... ok 29/81 ... ok 29/82 ... ok 7/84 ... ok 22/85 ... ok 7/86 ... ok 29/91 ... ok 29/92 ... ok 4/93 ... ok 4/94 ... ok 21/95 ... ok 29/96 ... ok 7/97 ... ok 64/99 ... ok 7/103 ... ok 24/104 ... ok 2/105 ... ok 4/106 ... ok 25/107 ... ok 25/108 ... ok 7/111 ... ok 28/113 ... ok 6/114 ... ok 7/115 ... ok 4/116 ... ok 29/117 ... ok 2/119 ... ok 21/120 ... repository is empty 4/121 ... ok 22/122 ... ok 2/124 ... repository is empty 4/125 ... ok 4/126 ... ok 29/127 ... ok 29/129 ... ok 4/130 ... ok 4/131 ... ok 4/132 ... ok 4/133 ... ok 4/134 ... ok 4/135 ... ok 29/138 ... ok 29/139 ... ok 29/140 ... ok 29/141 ... ok 7/142 ... ok 28/143 ... ok 2/144 ... ok 7/145 ... ok 2/146 ... ok 31/147 ... repository is empty 24/148 ... ok 22/149 ... ok 2/150 ... ok 23/151 ... ok 4/152 ... ok 4/153 ... ok 4/154 ... ok 23/155 ... ok 7/156 ... ok 8/159 ... ok 8/160 ... ok 2/161 ... ok 29/162 ... ok 29/163 ... ok 29/164 ... ok 29/165 ... ok 7/166 ... ok 29/167 ... ok 29/168 ... ok 8/169 ... ok 29/170 ... ok 29/171 ... ok 29/172 ... ok 29/173 ... ok 7/174 ... ok 22/176 ... ok 42/178 ... repository is empty 24/181 ... ok 24/182 ... ok 24/183 ... ok 7/184 ... ok 7/185 ... ok 7/186 ... ok 4/187 ... ok 2/188 ... ok 61/189 ... ok 29/190 ... ok 21/192 ... ok 7/194 ... ok 7/195 ... ok 2/196 ... ok 23/197 ... ok 20/199 ... repository is empty 20/200 ... ok 23/201 ... repository is empty 2/203 ... ok 23/204 ... ok 23/205 ... ok 22/206 ... ok 22/207 ... repository is empty 29/209 ... ok 29/210 ... ok 2/211 ... ok 61/212 ... ok 61/213 ... ok 61/214 ... ok 7/215 ... ok 62/216 ... ok 62/217 ... ok 63/218 ... ok 64/219 ... ok 6/220 ... ok 29/222 ... ok 29/223 ... ok 29/224 ... ok 6/226 ... ok 4/227 ... ok 29/228 ... ok 29/230 ... ok 29/231 ... ok 29/232 ... ok 4/237 ... ok 2/245 ... ok 29/246 ... ok 2/247 ... ok 2/248 ... ok 6/249 ... repository is empty 6/250 ... ok 29/251 ... ok 4/252 ... ok 29/253 ... ok 70/257 ... repository is empty 23/258 ... ok 8/259 ... repository is empty 4/260 ... ok 22/261 ... ok 7/264 ... ok 4/265 ... ok 2/266 ... ok 2/267 ... ok 29/268 ... ok 6/269 ... repository is empty 72/270 ... ok 28/272 ... ok 29/273 ... ok 29/275 ... 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 ...
Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results)
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: ... 4/2 ... yes 29/3 ... yes 29/5 ... yes 29/6 ... yes 29/7 ... yes 29/8 ... yes 29/9 ... yes 29/10 ... yes 29/11 ... yes 29/13 ... yes 4/15 ... yes 4/18 ... yes 4/19 ... yes 4/20 ... yes 4/21 ... yes 4/22 ... yes 4/23 ... yes 4/24 ... yes 4/25 ... yes 4/26 ... yes 4/27 ... yes 2/31 ... yes 4/36 ... yes 29/37 ... yes 8/38 ... yes 21/39 ... yes 29/41 ... yes 12/53 ... yes 7/55 ... yes 7/56 ... yes 7/57 ... yes 6/61 ... yes 8/64 ... yes 12/67 ... yes 8/68 ... yes 8/69 ... yes 8/70 ... yes 8/72 ... yes 21/73 ... yes 29/74 ... yes 8/75 ... yes 2/77 ... yes 21/78 ... yes 7/79 ... yes 29/80 ... yes 29/81 ... yes 29/82 ... yes 7/84 ... yes 22/85 ... yes 7/86 ... yes 29/91 ... yes 29/92 ... yes 4/93 ... yes 4/94 ... yes 21/95 ... yes 29/96 ... yes 7/97 ... yes 64/99 ... yes 7/103 ... yes 24/104 ... yes 2/105 ... yes 4/106 ... yes 25/107 ... yes 25/108 ... yes 7/111 ... yes 28/113 ... yes 6/114 ... yes 7/115 ... yes 4/116 ... yes 29/117 ... yes 2/119 ... yes 21/120 ... yes 4/121 ... yes 22/122 ... yes 2/124 ... yes 4/125 ... yes 4/126 ... yes 29/127 ... yes 29/129 ... yes 4/130 ... yes 4/131 ... yes 4/132 ... yes 4/133 ... yes 4/134 ... yes 4/135 ... yes 29/138 ... yes 29/139 ... yes 29/140 ... yes 29/141 ... yes 7/142 ... yes 28/143 ... yes 2/144 ... yes 7/145 ... yes 2/146 ... yes 31/147 ... yes 24/148 ... yes 22/149 ... yes 2/150 ... yes 23/151 ... yes 4/152 ... yes 4/153 ... yes 4/154 ... yes 23/155 ... yes 7/156 ... yes 8/159 ... yes 8/160 ... yes 2/161 ... yes 29/162 ... yes 29/163 ... yes 29/164 ... yes 29/165 ... yes 7/166 ... yes 29/167 ... yes 29/168 ... yes 8/169 ... yes 29/170 ... yes 29/171 ... yes 29/172 ... yes 29/173 ... yes 7/174 ... yes 22/176 ... yes 42/178 ... yes 24/181 ... yes 24/182 ... yes 24/183 ... yes 7/184 ... yes 7/185 ... yes 7/186 ... yes 4/187 ... yes 2/188 ... yes 61/189 ... yes 29/190 ... yes 21/192 ... yes 7/194 ... yes 7/195 ... yes 2/196 ... yes 23/197 ... yes 20/199 ... yes 20/200 ... yes 23/201 ... yes 2/203 ... yes 23/204 ... yes 23/205 ... yes 22/206 ... yes 22/207 ... yes 29/209 ... yes 29/210 ... yes 2/211 ... yes 61/212 ... yes 61/213 ... yes 61/214 ... yes 7/215 ... yes 62/216 ... yes 62/217 ... yes 63/218 ... yes 64/219 ... yes 6/220 ... yes 29/222 ... yes 29/223 ... yes 29/224 ... yes 6/226 ... yes 4/227 ... yes 29/228 ... yes 29/230 ... yes 29/231 ... yes 29/232 ... yes 4/237 ... yes 2/245 ... yes 29/246 ... yes 2/247 ... yes 2/248 ... yes 6/249 ... yes 6/250 ... yes 29/251 ... yes 4/252 ... yes 29/253 ... yes 70/257 ... yes 23/258 ... yes 8/259 ... yes 4/260 ... yes 22/261 ... yes 7/264 ... yes 4/265 ... yes 2/266 ... yes 2/267 ... yes 29/268 ... yes 6/269 ... yes 72/270 ... yes 28/272 ... yes 29/273 ... yes 29/275 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.3 ? ... yes (2.3.3) Git version >= 2.7.3 ? ... yes (2.13.0) Active users: ... 55
Checking GitLab ... Finished