2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-07-07 11:18:12 +05:30
|
|
|
class UserCallout < ApplicationRecord
|
2021-11-11 11:23:49 +05:30
|
|
|
include Calloutable
|
2018-03-17 18:26:18 +05:30
|
|
|
|
2020-11-24 15:15:51 +05:30
|
|
|
enum feature_name: {
|
|
|
|
gke_cluster_integration: 1,
|
|
|
|
gcp_signup_offer: 2,
|
|
|
|
cluster_security_warning: 3,
|
2021-04-17 20:07:23 +05:30
|
|
|
ultimate_trial: 4, # EE-only
|
2021-03-11 19:13:27 +05:30
|
|
|
geo_enable_hashed_storage: 5, # EE-only
|
|
|
|
geo_migrate_hashed_storage: 6, # EE-only
|
|
|
|
canary_deployment: 7, # EE-only
|
|
|
|
gold_trial_billings: 8, # EE-only
|
2020-11-24 15:15:51 +05:30
|
|
|
suggest_popover_dismissed: 9,
|
|
|
|
tabs_position_highlight: 10,
|
2021-03-11 19:13:27 +05:30
|
|
|
threat_monitoring_info: 11, # EE-only
|
2021-11-11 11:23:49 +05:30
|
|
|
two_factor_auth_recovery_settings_check: 12, # EE-only
|
2021-03-11 19:13:27 +05:30
|
|
|
web_ide_alert_dismissed: 16, # no longer in use
|
2020-11-24 15:15:51 +05:30
|
|
|
active_user_count_threshold: 18, # EE-only
|
|
|
|
buy_pipeline_minutes_notification_dot: 19, # EE-only
|
|
|
|
personal_access_token_expiry: 21, # EE-only
|
|
|
|
suggest_pipeline: 22,
|
|
|
|
customize_homepage: 23,
|
2021-01-29 00:20:46 +05:30
|
|
|
feature_flags_new_version: 24,
|
2021-02-22 17:27:13 +05:30
|
|
|
registration_enabled_callout: 25,
|
2021-03-11 19:13:27 +05:30
|
|
|
new_user_signups_cap_reached: 26, # EE-only
|
|
|
|
unfinished_tag_cleanup_callout: 27,
|
2021-04-29 21:17:54 +05:30
|
|
|
eoa_bronze_plan_banner: 28, # EE-only
|
2021-06-08 01:23:25 +05:30
|
|
|
pipeline_needs_banner: 29,
|
|
|
|
pipeline_needs_hover_tip: 30,
|
2021-09-04 01:27:46 +05:30
|
|
|
web_ide_ci_environments_guidance: 31,
|
2021-09-30 23:02:18 +05:30
|
|
|
security_configuration_upgrade_banner: 32,
|
|
|
|
cloud_licensing_subscription_activation_banner: 33, # EE-only
|
|
|
|
trial_status_reminder_d14: 34, # EE-only
|
|
|
|
trial_status_reminder_d3: 35, # EE-only
|
2021-10-27 15:23:28 +05:30
|
|
|
security_configuration_devops_alert: 36, # EE-only
|
|
|
|
profile_personal_access_token_expiry: 37, # EE-only
|
2021-11-18 22:05:49 +05:30
|
|
|
terraform_notification_dismissed: 38,
|
|
|
|
security_newsletter_callout: 39
|
2020-11-24 15:15:51 +05:30
|
|
|
}
|
2018-03-17 18:26:18 +05:30
|
|
|
|
|
|
|
validates :feature_name,
|
|
|
|
presence: true,
|
|
|
|
uniqueness: { scope: :user_id },
|
|
|
|
inclusion: { in: UserCallout.feature_names.keys }
|
|
|
|
end
|