Skip to content

Update package namespace settings permissions

Steve Abrams requested to merge 350682-packagesetting-permissions into master

🍭 What does this MR do and why?

Changes the required permissions to change namespace/group-level package settings from Developer to Maintainer.

This MR also refactors the permissions to use admin_package rather than have a separate subset of permissions for package settings. This is more aligned with the rest of the permissions throughout GitLab.

🍬 Screenshots or screen recordings

Screen_Shot_2022-05-05_at_3.38.17_PM

💻 How to set up and validate locally

  1. Create a group (or pick an existing one)
  2. Create a user
  3. Add the user to the group as a Developer
  4. While logged in as the Developer user, use the graphql explorer: http://gdk.test:3000/-/graphql-explorer to try to update the namespace package settings using the query below:
    mutation {
      updateNamespacePackageSettings(input: {
        namespacePath: "<your-namespace-full-path>", 
        genericDuplicatesAllowed:true, 
        genericDuplicateExceptionRegex: "asdf.*"
      }) {
        packageSettings {
    	 genericDuplicatesAllowed
          genericDuplicateExceptionRegex
        }
      }
    }
  5. The request should be unsuccessful
  6. Optionally, you can log back in as the root user or owner/maintainer of the group and make the request again, it should be successful.

📐 MR acceptance checklist

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

Related: #350682 (closed)

Edited by Steve Abrams

Merge request reports