Skip to content

Project settings: add 'Packages' visibility setting

Jonas Wälter requested to merge siemens/gitlab:public-packages into master

Situation

With the GitLab Package Registry, you can use GitLab as a private or public registry for a variety of supported package managers. The visibility of the Package Registry depends on the project visibility: Packages are only accessible to all (anonymous), if the project itself is public. In the project settings, you can enable/disable the Package Registry but you can't configure the visibility.

📄 Documentation: Package Registry visibility permissions

Proposal

Let's allow to have public visibility in private/internal projects. So let's add packages visiblity settings on project-level.

🔗 Related issue: Feature specific permissions for the Package R... (#329253 - closed)

What does this MR do and why?

This MR adds a Packages visibility setting to the project settings (General > Visibility, project features, permissions). The MR does NOT implement the handling of this setting for the different package types (e.g. Composer, Conan, Maven, npm, ...). Thus, the new visibility setting is behind the new package_registry_access_level feature flag. Several follow-up MRs are needed to implement the handling for the different package types.

Implementation plan

🛠 with at Siemens

/cc @bufferoverflow

Screenshots

Project settings: before Project settings: after (package_registry_access_level feature flag enabled)
image image

How to set up and validate locally

  1. Enable the feature flag
    Feature.enable(:package_registry_access_level)
  2. In a project, go to Settings > General > Visibility, project features, permissions.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Jonas Wälter

Merge request reports