diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 11:17:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 11:17:02 +0300 |
commit | b39512ed755239198a9c294b6a45e65c05900235 (patch) | |
tree | d234a3efade1de67c46b9e5a38ce813627726aa7 /app/models/users | |
parent | d31474cf3b17ece37939d20082b07f6657cc79a9 (diff) |
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'app/models/users')
-rw-r--r-- | app/models/users/callout.rb | 9 | ||||
-rw-r--r-- | app/models/users/group_callout.rb | 8 | ||||
-rw-r--r-- | app/models/users/project_callout.rb | 21 |
3 files changed, 35 insertions, 3 deletions
diff --git a/app/models/users/callout.rb b/app/models/users/callout.rb index 570e3ae9b3c..7b5c7fef7ba 100644 --- a/app/models/users/callout.rb +++ b/app/models/users/callout.rb @@ -55,8 +55,13 @@ module Users preview_user_over_limit_free_plan_alert: 50, # EE-only user_reached_limit_free_plan_alert: 51, # EE-only submit_license_usage_data_banner: 52, # EE-only - personal_project_limitations_banner: 53, # EE-only - mr_experience_survey: 54 + personal_project_limitations_banner: 53, # EE-only + mr_experience_survey: 54, + namespace_storage_limit_banner_info_threshold: 55, # EE-only + namespace_storage_limit_banner_warning_threshold: 56, # EE-only + namespace_storage_limit_banner_alert_threshold: 57, # EE-only + namespace_storage_limit_banner_error_threshold: 58, # EE-only + project_quality_summary_feedback: 59 # EE-only } validates :feature_name, diff --git a/app/models/users/group_callout.rb b/app/models/users/group_callout.rb index 0ea7b8199aa..70498ae83e0 100644 --- a/app/models/users/group_callout.rb +++ b/app/models/users/group_callout.rb @@ -17,7 +17,13 @@ module Users 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 - free_group_limited_alert: 9 # EE-only + free_group_limited_alert: 9, # EE-only + namespace_storage_limit_banner_info_threshold: 10, # EE-only + namespace_storage_limit_banner_warning_threshold: 11, # EE-only + namespace_storage_limit_banner_alert_threshold: 12, # EE-only + namespace_storage_limit_banner_error_threshold: 13, # EE-only + usage_quota_trial_alert: 14, # EE-only + preview_usage_quota_free_plan_alert: 15 # EE-only } validates :group, presence: true diff --git a/app/models/users/project_callout.rb b/app/models/users/project_callout.rb new file mode 100644 index 00000000000..ddc5f8fb4de --- /dev/null +++ b/app/models/users/project_callout.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module Users + class ProjectCallout < ApplicationRecord + include Users::Calloutable + + self.table_name = 'user_project_callouts' + + belongs_to :project + + enum feature_name: { + awaiting_members_banner: 1 # EE-only + } + + validates :project, presence: true + validates :feature_name, + presence: true, + uniqueness: { scope: [:user_id, :project_id] }, + inclusion: { in: ProjectCallout.feature_names.keys } + end +end |