Skip to content

Shows project storage limit notifications only to owners

What does this MR do and why?

Displays the repository size notifications only to owners (previously it was displayed to maintainer level too)

Resolves #370971 (closed)

Screenshots or screen recordings

maintainer owner
Screenshot_2022-10-04_at_14.43.34 Screenshot_2022-10-04_at_14.43.22

How to set up and validate locally

  1. In Rails console set following:

    Feature.disable(:namespace_storage_limit)
    ::Gitlab::CurrentSettings.update(enforce_namespace_storage_limit: false)
  2. Then open local admin settings (http://127.0.0.1:3000/admin/application_settings/general), and in the "Account and limit" section set "Size limit per repository (MB)" to something low, like 10

  3. Create a group and a project and upload there a file that would exceed the limit

    E.g. dd if=/dev/urandom of=10M.dat bs=10M count=1 will generate a 10MiB file on MacOS

    The group size recalculation might take a while, I think [recalculate repository size] button in group usage quotas page should speed up the process

  4. Then a user with maintainer level to the group, and check the group page with Owner and Maintainer user permissions: maintainer should not see the "locked" message, while the owner should.

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 Kos Palchyk

Merge request reports