Developers can create projects in GitLab group using `git push` when group has `Allowed to create projects` set to `Masters`
Summary
Developers can create projects in GitLab group using git push
when group has Allowed to create projects
set to Masters
Steps to reproduce
- create new user
user1
, create new groupgroup1
, assign this userDeveloper
access togroup1
- go to
group1
> Settings and setAllowed to create projects
toMasters
- login as
user1
, opengroup1
, make sure that you cannot create projects in UI - while working locally as
user1
create a git repo and try to push it to GitLab using the steps from https://docs.gitlab.com/ee/gitlab-basics/create-project.html#push-to-create-a-new-project
What is the current bug behavior?
It will be possible to push the project successfully:
$ git push --set-upstream git@gitlabhost.tld:test-group/push-project10101.git master
Counting objects: 3, done.
Writing objects: 100% (3/3), 210 bytes | 210.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote:
remote: The private project test-group/push-project10101 was successfully created.
remote:
remote: To configure the remote, run:
remote: git remote add origin ssh://git@gitlabhost.tld:1422/test-group/push-project10101.git
remote:
remote: To view the project, visit:
remote: https://gitlabhost.tld/test-group/push-project10101
remote:
To gitlabhost.tld:test-group/push-project10101.git
* [new branch] master -> master
Branch 'master' set up to track remote branch 'master' from 'git@gitlabhost.tld:test-group/push-project10101.git'.
What is the expected correct behavior?
It should not be possible to push create a project in such case.
Relevant logs and/or screenshots
n/a
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Debian 8.10 Proxy: no Current User: git Using RVM: no Ruby Version: 2.3.6p384 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.3.0 Redis Version: 3.2.11 Git Version: 2.14.3 Sidekiq Version:5.0.5 Go Version: unknown
GitLab information Version: 10.7.3-ee Revision: 584a495 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.8 URL: https://gitlabhost.tld HTTP Clone URL: https://gitlabhost.tld/some-group/some-project.git SSH Clone URL: ssh://git@gitlabhost.tld:1422/some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 7.1.2 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.2 ? ... OK (7.1.2) 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: ... 1/1 ... repository is empty 1/2 ... repository is empty 1/3 ... repository is empty 1/4 ... ok 1/5 ... repository is empty 2/9 ... ok 1/10 ... repository is empty 1/11 ... ok 1/12 ... repository is empty 1/13 ... ok 1/15 ... ok 1/17 ... ok 1/18 ... repository is empty 1/19 ... ok 1/20 ... ok 8/21 ... repository is empty 9/22 ... ok 2/23 ... ok 2/24 ... ok 2/25 ... ok 2/26 ... ok 2/27 ... 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
Checking Reply by email ...
Init.d configured correctly? ... skipped MailRoom running? ... skipped
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: ... 1/1 ... yes 1/2 ... yes 1/3 ... yes 1/4 ... yes 1/5 ... yes 2/9 ... yes 1/10 ... yes 1/11 ... yes 1/12 ... yes 1/13 ... yes 1/15 ... yes 1/17 ... yes 1/18 ... yes 1/19 ... yes 1/20 ... yes 8/21 ... yes 9/22 ... yes 2/23 ... yes 2/24 ... yes 2/25 ... yes 2/26 ... yes 2/27 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.3.6) Git version >= 2.9.5 ? ... yes (2.14.3) Git user has default SSH configuration? ... yes Active users: ... 4 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)
Checking GitLab ... Finished