diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
commit | 3cccd102ba543e02725d247893729e5c73b38295 (patch) | |
tree | f36a04ec38517f5deaaacb5acc7d949688d1e187 /app/models/users | |
parent | 205943281328046ef7b4528031b90fbda70c75ac (diff) |
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'app/models/users')
-rw-r--r-- | app/models/users/callout.rb | 3 | ||||
-rw-r--r-- | app/models/users/group_callout.rb | 4 | ||||
-rw-r--r-- | app/models/users/in_product_marketing_email.rb | 7 |
3 files changed, 11 insertions, 3 deletions
diff --git a/app/models/users/callout.rb b/app/models/users/callout.rb index 0922323e12b..a91a3406b22 100644 --- a/app/models/users/callout.rb +++ b/app/models/users/callout.rb @@ -48,7 +48,8 @@ module Users storage_enforcement_banner_third_enforcement_threshold: 45, storage_enforcement_banner_fourth_enforcement_threshold: 46, attention_requests_top_nav: 47, - attention_requests_side_nav: 48 + attention_requests_side_nav: 48, + minute_limit_banner: 49 } validates :feature_name, diff --git a/app/models/users/group_callout.rb b/app/models/users/group_callout.rb index 839be8d2a48..373bc30889f 100644 --- a/app/models/users/group_callout.rb +++ b/app/models/users/group_callout.rb @@ -14,7 +14,9 @@ module Users storage_enforcement_banner_first_enforcement_threshold: 3, storage_enforcement_banner_second_enforcement_threshold: 4, storage_enforcement_banner_third_enforcement_threshold: 5, - storage_enforcement_banner_fourth_enforcement_threshold: 6 + storage_enforcement_banner_fourth_enforcement_threshold: 6, + preview_user_over_limit_free_plan_alert: 7, # EE-only + user_reached_limit_free_plan_alert: 8 # EE-only } validates :group, presence: true diff --git a/app/models/users/in_product_marketing_email.rb b/app/models/users/in_product_marketing_email.rb index 1f1eaacfe5c..f2f1d18339e 100644 --- a/app/models/users/in_product_marketing_email.rb +++ b/app/models/users/in_product_marketing_email.rb @@ -26,12 +26,17 @@ module Users invite_team: 8 }, _suffix: true + # Tracks we don't send emails for (e.g. unsuccessful experiment). These + # are kept since we already have DB records that use the enum value. + INACTIVE_TRACK_NAMES = %w(invite_team).freeze + ACTIVE_TRACKS = tracks.except(*INACTIVE_TRACK_NAMES) + scope :without_track_and_series, -> (track, series) do users = User.arel_table product_emails = arel_table join_condition = users[:id].eq(product_emails[:user_id]) - .and(product_emails[:track]).eq(tracks[track]) + .and(product_emails[:track]).eq(ACTIVE_TRACKS[track]) .and(product_emails[:series]).eq(series) arel_join = users.join(product_emails, Arel::Nodes::OuterJoin).on(join_condition) |