Skip to content

Visibility level error when updating group from API

Summary

I get the following error when trying to rename a group from the API: 'visibility_level' private is not allowed since this group contains projects with higher visibility.

Steps to reproduce

Call the API with a PUT /groups/<GROUP ID> and name: anything as payload.

What is the current bug behavior?

Error 400 with error message 'visibility_level' private is not allowed since this group contains projects with higher visibility.

What is the expected correct behavior?

No error and name updated.

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.4p296
Gem Version:    2.7.6
Bundler Version:1.16.2
Rake Version:   12.3.1
Redis Version:  3.2.11
Git Version:    2.17.1
Sidekiq Version:5.1.3
Go Version:     go1.9.4 linux/amd64

GitLab information Version: 11.0.2 Revision: d9540ee Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://git..net HTTP Clone URL: https://git..net/some-group/some-project.git SSH Clone URL: git@git.******.net:some-group/some-project.git Using LDAP: yes Using Omniauth: no

GitLab Shell Version: 7.1.4 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git

Possible fixes

As a workaround, adding a visibility tag in the payload with the current visibility level (actually internal) avoids the error.

Edited by Gauthier Delacroix