2018-07-25 05:30:33 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-03-28 09:17:42 -04:00
|
|
|
class UserCallout < ApplicationRecord
|
2021-09-14 20:09:30 -04:00
|
|
|
include Calloutable
|
2018-02-01 21:07:33 -05:00
|
|
|
|
2020-09-16 20:09:34 -04:00
|
|
|
enum feature_name: {
|
|
|
|
gke_cluster_integration: 1,
|
|
|
|
gcp_signup_offer: 2,
|
|
|
|
cluster_security_warning: 3,
|
2021-02-24 13:11:28 -05:00
|
|
|
ultimate_trial: 4, # EE-only
|
2021-02-01 16:09:15 -05:00
|
|
|
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-09-16 20:09:34 -04:00
|
|
|
suggest_popover_dismissed: 9,
|
|
|
|
tabs_position_highlight: 10,
|
2021-02-01 16:09:15 -05:00
|
|
|
threat_monitoring_info: 11, # EE-only
|
2021-08-31 08:11:07 -04:00
|
|
|
two_factor_auth_recovery_settings_check: 12, # EE-only
|
2021-02-01 16:09:15 -05:00
|
|
|
web_ide_alert_dismissed: 16, # no longer in use
|
2020-09-16 20:09:34 -04:00
|
|
|
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,
|
2020-11-16 04:09:18 -05:00
|
|
|
feature_flags_new_version: 24,
|
2020-11-19 10:09:13 -05:00
|
|
|
registration_enabled_callout: 25,
|
2021-02-01 16:09:15 -05:00
|
|
|
new_user_signups_cap_reached: 26, # EE-only
|
|
|
|
unfinished_tag_cleanup_callout: 27,
|
2021-04-16 14:09:14 -04:00
|
|
|
eoa_bronze_plan_banner: 28, # EE-only
|
2021-04-22 14:10:13 -04:00
|
|
|
pipeline_needs_banner: 29,
|
2021-05-07 17:10:34 -04:00
|
|
|
pipeline_needs_hover_tip: 30,
|
2021-06-14 11:09:48 -04:00
|
|
|
web_ide_ci_environments_guidance: 31,
|
2021-07-06 05:07:05 -04:00
|
|
|
security_configuration_upgrade_banner: 32,
|
2021-07-14 17:09:44 -04:00
|
|
|
cloud_licensing_subscription_activation_banner: 33, # EE-only
|
|
|
|
trial_status_reminder_d14: 34, # EE-only
|
2021-07-15 11:09:41 -04:00
|
|
|
trial_status_reminder_d3: 35, # EE-only
|
2021-08-11 05:10:00 -04:00
|
|
|
security_configuration_devops_alert: 36, # EE-only
|
2021-08-16 05:09:05 -04:00
|
|
|
profile_personal_access_token_expiry: 37, # EE-only
|
2021-09-30 14:11:31 -04:00
|
|
|
terraform_notification_dismissed: 38,
|
|
|
|
security_newsletter_callout: 39
|
2020-09-16 20:09:34 -04:00
|
|
|
}
|
2018-02-02 18:16:24 -05:00
|
|
|
|
|
|
|
validates :feature_name,
|
|
|
|
presence: true,
|
|
|
|
uniqueness: { scope: :user_id },
|
|
|
|
inclusion: { in: UserCallout.feature_names.keys }
|
2018-01-26 11:06:52 -05:00
|
|
|
end
|