Internal snippet on public project only visible to project members
Summary
When creating a new Snippet in a public repository, it is only visible to Members of the project.
The link to the snippet results in a 404 error.
Steps to reproduce
- Create public project
- Create internal snippet
- Try to access snippet as logged in user who is no member of the project
- Links to the snippet yield a 404 error for said user
Example Project
I set up an example project with such a snippet.
Screenshot
What is the current bug behavior?
Internal Snippets on public projects appear to have private visibility.
What is the expected correct behavior?
Internal Snippets on public projects are accessible by any logged in user.
Output of checks
This bug happens on GitLab.com and locally.
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.4.5p335 Gem Version: 2.7.6 Bundler Version:1.16.6 Rake Version: 12.3.1 Redis Version: 3.2.12 Git Version: 2.18.1 Sidekiq Version:5.2.1 Go Version: unknownGitLab information Version: 11.5.0 Revision: b7b1e8e Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://ts-gitlab.iup.uni-heidelberg.de HTTP Clone URL: https://ts-gitlab.iup.uni-heidelberg.de/some-group/some-project.git SSH Clone URL: ssh://git@ts-gitlab.iup.uni-heidelberg.de:10022/some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers:
GitLab Shell Version: 8.4.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
Related issues
- gitlab-ce#27573 collects ideas to simplify the Snippet visibility levels
gitlab-ce~2278648