visibility level restrictions apply to admins when forking a project
Summary
In the settings, under "Visibility and Access Controls", where you can set visibility level restrictions, there is some text that says:
Selected levels cannot be used by non-admin users for projects or snippets. If the public level is restricted, user profiles are only visible to logged in users.
However... when private visibility level is set to restricted, an admin is unable to make a (private) fork of a private project.
Steps to reproduce
- Set private visibility level to restricted in
application_settings
, under "Visibility and Access Controls". - As an admin, fork a project that has private visibility
What is the current bug behavior?
Fork Error appears:
You tried to fork group / project but it failed for the following reason:
– Visibility level visibilitylevel|public is not allowed since the fork source project has lower visibility.
[Try to fork again]
What is the expected correct behavior?
Visibility levels restrictions do not apply to the admin. The fork appears and has private visibility level.
OR
The help text in the settings is updated to reflect the current behaviour.
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.4.3 Revision: b125d21 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: http://gitlab.mycompany.com HTTP Clone URL: http://gitlab.mycompany.com/some-group/some-project.git SSH Clone URL: git@gitlab.mycompany.com:some-group/some-project.git Using LDAP: no Using Omniauth: no
GitLab Shell Version: 5.3.1 Repository storage paths:
- default: /data/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git