I manage Gitlab on the server for internal users.
I want to grant some internal users the permission master/owner but on the other hand I want to forbid changing the visibility to public.
Any good ideas?
That doesn't seem possible with the current GitLab.
The only restriction currently in place is:
2014:
In
gitlab.ymlyou can disable public projects or public and internal projects for the entire GitLab installation to prevent people making code public by accident.
But if your users are admins, they would still be able to make a project public.
2016, as mentioned below by Gregor Schmidt, the setting is now in Admin / Application Setting since GitLab 8.3.0 (Nov. 2015).
See app/helpers/application_settings_helper.rb and app/controllers/admin/application_settings_controller.rb.
The setting looks like this:

This setting was moved from a configuration file to the web ui. You may find it in the documentation.
In the Admin area under Settings (
/admin/application_settings), you can restrict the use of visibility levels for users when they create a project or a snippet. This is useful to prevent people exposing their repositories to public by accident. The restricted visibility settings do not apply to admin users.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With