After update to 10.7.2-ee the users that have access to a project, but not to the group of the project are unable to use the group labels for issues.
Summary
After update to 10.7.2-ee the users that have access to a project, but not to the group of the project are unable to use the group labels for issues.
Steps to reproduce
1 - Create a private group (as owner user) 2 - Create label for group (as owner user) 3 - Create a project in the group of step 1 4 - Create a user with developer access to the project of step 3, but do not grant any access to the group created on step 1 5 - With the user created on step 4, when you try to create an issue on the project of step 3, the dropdown shows empty
Example Project
N/A
What is the current bug behavior?
The list of labels on the issue shows empty. However, if you go to the group, that you have no access (inherited by project access) you will be able to see the labels
If has only to do with the request https://githost/[project path]/labels.json?include_ancestor_groups=true
What is the expected correct behavior?
As per previous version, it should show the project and group tree labels.
Relevant logs and/or screenshots
N/A
Output of checks
N/A
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.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.2-ee Revision: a4f29081 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 10.3 URL: https://githost HTTP Clone URL: https://githost/some-group/some-project.git SSH Clone URL: git@githost:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no 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: ... 10/3 ... ok 15/5 ... ok 15/6 ... ok 15/7 ... ok 16/8 ... ok 15/9 ... ok 10/10 ... ok 10/11 ... ok 10/12 ... ok 10/13 ... ok 10/14 ... ok 16/15 ... ok 16/16 ... ok 21/17 ... ok 16/19 ... ok 16/20 ... ok 16/21 ... ok 16/22 ... ok 16/23 ... ok 16/24 ... ok 16/25 ... ok 16/26 ... ok 16/27 ... ok 16/28 ... ok 16/29 ... ok 16/30 ... ok 16/31 ... ok 16/32 ... 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 ...
LDAP is disabled in config/gitlab.yml
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: ... 10/3 ... yes 15/5 ... yes 15/6 ... yes 15/7 ... yes 16/8 ... yes 15/9 ... yes 10/10 ... yes 10/11 ... yes 10/12 ... yes 10/13 ... yes 10/14 ... yes 16/15 ... yes 16/16 ... yes 21/17 ... yes 16/19 ... yes 16/20 ... yes 16/21 ... yes 16/22 ... yes 16/23 ... yes 16/24 ... yes 16/25 ... yes 16/26 ... yes 16/27 ... yes 16/28 ... yes 16/29 ... yes 16/30 ... yes 16/31 ... yes 16/32 ... 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: ... 28 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)
Checking GitLab ... Finished
Possible fixes
Somehow related to :
https://gitlab.com/gitlab-org/gitlab-ee/blob/master/app/finders/labels_finder.rb#L145
https://gitlab.com/gitlab-org/gitlab-ee/commit/652e9cf5c153a727018126a730108048c15269ec
https://gitlab.com/gitlab-org/gitlab-ee/commit/ad7148d9ead6e76a80840c069ca0921f7e790041
(If you can, link to the line of code that might be responsible for the problem)