Skip to content

Add reached limit warning for free namespaces

Doug Stull requested to merge 352642-notify-free-plans-when-over-limit into master

What does this MR do and why?

  • we need to alert free namespaces they reached the limit after June 22 and this will do that.
  • this should take precedence over the preview alert in the same partial - so we ensure that with an if/elsif
    • this will ensure we don't care if the preview_free_user_cap feature flag is turned off when free_user_cap is turned on.
  • see more details in #352642

Screenshots or screen recordings

Screen_Shot_2022-04-04_at_10.06.18_AM

How to set up and validate locally

  1. Create a new group.
  2. Setup gdk to simulate SaaS - https://docs.gitlab.com/ee/development/ee_features.html#act-as-saas and restart GDK
  3. Feature.enable(:free_user_cap) in console.
  4. ApplicationSetting.first.update(check_namespace_plan: true) in console.
  5. Set this method to return true with a return true just under the method definition.

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 to #352642

Edited by Doug Stull

Merge request reports