Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-20 02:18:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-20 02:18:09 +0300
commit6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch)
treedc4d20fe6064752c0bd323187252c77e0a89144b /app/models/users
parent9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff)
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'app/models/users')
-rw-r--r--app/models/users/callout.rb14
-rw-r--r--app/models/users/credit_card_validation.rb6
-rw-r--r--app/models/users/ghost_user_migration.rb12
-rw-r--r--app/models/users/group_callout.rb8
-rw-r--r--app/models/users/namespace_callout.rb8
-rw-r--r--app/models/users/project_callout.rb4
6 files changed, 36 insertions, 16 deletions
diff --git a/app/models/users/callout.rb b/app/models/users/callout.rb
index 7b5c7fef7ba..03841ee48fa 100644
--- a/app/models/users/callout.rb
+++ b/app/models/users/callout.rb
@@ -43,12 +43,11 @@ module Users
verification_reminder: 40, # EE-only
ci_deprecation_warning_for_types_keyword: 41,
security_training_feature_promotion: 42, # EE-only
- storage_enforcement_banner_first_enforcement_threshold: 43,
- storage_enforcement_banner_second_enforcement_threshold: 44,
- storage_enforcement_banner_third_enforcement_threshold: 45,
- storage_enforcement_banner_fourth_enforcement_threshold: 46,
- attention_requests_top_nav: 47,
- attention_requests_side_nav: 48,
+ storage_enforcement_banner_first_enforcement_threshold: 43, # EE-only
+ storage_enforcement_banner_second_enforcement_threshold: 44, # EE-only
+ storage_enforcement_banner_third_enforcement_threshold: 45, # EE-only
+ storage_enforcement_banner_fourth_enforcement_threshold: 46, # EE-only
+ # 47 and 48 were removed with https://gitlab.com/gitlab-org/gitlab/-/merge_requests/95446
# 49 was removed with https://gitlab.com/gitlab-org/gitlab/-/merge_requests/91533
# because the banner was no longer relevant.
# Records will be migrated with https://gitlab.com/gitlab-org/gitlab/-/issues/367293
@@ -61,7 +60,8 @@ module Users
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
+ project_quality_summary_feedback: 59, # EE-only
+ merge_request_settings_moved_callout: 60
}
validates :feature_name,
diff --git a/app/models/users/credit_card_validation.rb b/app/models/users/credit_card_validation.rb
index 998a5deb0fd..272f31aa9ce 100644
--- a/app/models/users/credit_card_validation.rb
+++ b/app/models/users/credit_card_validation.rb
@@ -21,5 +21,11 @@ module Users
network: network
).order(credit_card_validated_at: :desc).includes(:user)
end
+
+ def similar_holder_names_count
+ return 0 unless holder_name
+
+ self.class.where('lower(holder_name) = lower(:value)', value: holder_name).count
+ end
end
end
diff --git a/app/models/users/ghost_user_migration.rb b/app/models/users/ghost_user_migration.rb
new file mode 100644
index 00000000000..1d93498e88b
--- /dev/null
+++ b/app/models/users/ghost_user_migration.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+module Users
+ class GhostUserMigration < ApplicationRecord
+ self.table_name = 'ghost_user_migrations'
+
+ belongs_to :user
+ belongs_to :initiator_user, class_name: 'User'
+
+ validates :user_id, presence: true
+ end
+end
diff --git a/app/models/users/group_callout.rb b/app/models/users/group_callout.rb
index 70498ae83e0..3e3e424e9c9 100644
--- a/app/models/users/group_callout.rb
+++ b/app/models/users/group_callout.rb
@@ -11,10 +11,10 @@ module Users
enum feature_name: {
invite_members_banner: 1,
approaching_seat_count_threshold: 2, # EE-only
- 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_first_enforcement_threshold: 3, # EE-only
+ storage_enforcement_banner_second_enforcement_threshold: 4, # EE-only
+ storage_enforcement_banner_third_enforcement_threshold: 5, # EE-only
+ storage_enforcement_banner_fourth_enforcement_threshold: 6, # EE-only
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
diff --git a/app/models/users/namespace_callout.rb b/app/models/users/namespace_callout.rb
index a20a196a4ef..4e655a96b57 100644
--- a/app/models/users/namespace_callout.rb
+++ b/app/models/users/namespace_callout.rb
@@ -11,10 +11,10 @@ module Users
enum feature_name: {
invite_members_banner: 1,
approaching_seat_count_threshold: 2, # EE-only
- 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_first_enforcement_threshold: 3, # EE-only
+ storage_enforcement_banner_second_enforcement_threshold: 4, # EE-only
+ storage_enforcement_banner_third_enforcement_threshold: 5, # EE-only
+ storage_enforcement_banner_fourth_enforcement_threshold: 6, # EE-only
preview_user_over_limit_free_plan_alert: 7, # EE-only
user_reached_limit_free_plan_alert: 8, # EE-only
web_hook_disabled: 9
diff --git a/app/models/users/project_callout.rb b/app/models/users/project_callout.rb
index ddc5f8fb4de..98dacbe394a 100644
--- a/app/models/users/project_callout.rb
+++ b/app/models/users/project_callout.rb
@@ -9,7 +9,9 @@ module Users
belongs_to :project
enum feature_name: {
- awaiting_members_banner: 1 # EE-only
+ awaiting_members_banner: 1, # EE-only
+ web_hook_disabled: 2,
+ ultimate_feature_removal_banner: 3
}
validates :project, presence: true