Skip to content

Block project abilities when namespace over storage limit

Tyler Amos requested to merge 227138-storage-limit-project-policy into master

What does this MR do?

Adds prevention policies to project when:

  1. root namespace is over storage limit
  2. the instance is dot com
  3. the feature flag, :namespace_storage_limit, is enabled

This is similar to !36493 (merged) (policy at the namespace-level) and !36431 (merged) (policy at the issue level).

Testing this locally

You can test this change locally with the following steps:

  1. Go to any project within your local GL installation.
  2. Note that you have ability to do things like create issues, create merge requests, add comments or push code.
  3. The easiest way to test abilities when a project's namespace is over the storage limit is to force it into that state by updating the over_storage_limit? method on namespace.
    • Add return true as the first line in that method.
  4. Refresh the main project and verify those abilities listed previously are no longer available. Make sure you are not able to create issues, comments, or push code.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

Related to #227138

Edited by Tyler Amos

Merge request reports

Loading