Skip to content

Commit

Permalink
VaNotify - Add feature flag (#12611)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanbwright authored May 10, 2023
1 parent dd2e4da commit a715b39
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 4 additions & 2 deletions app/models/saved_claim/education_benefits/va_1990.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ class SavedClaim::EducationBenefits::VA1990 < SavedClaim::EducationBenefits
def after_submit(user)
return unless Flipper.enabled?(:form1990_confirmation_email)

# only sending to unauthenticated users at this time
return if user.present?
if Flipper.enabled?(:form_confirmation_edu_auth_user) && user.present?
# only sending to unauthenticated users at this time
return
end

parsed_form_data ||= JSON.parse(form)
email = parsed_form_data['email']
Expand Down
6 changes: 4 additions & 2 deletions app/models/saved_claim/education_benefits/va_1990e.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ class SavedClaim::EducationBenefits::VA1990e < SavedClaim::EducationBenefits
def after_submit(user)
return unless Flipper.enabled?(:form1990e_confirmation_email)

# only sending to unauthenticated users at this time
return if user.present?
if Flipper.enabled?(:form_confirmation_edu_auth_user) && user.present?
# only sending to unauthenticated users at this time
return
end

parsed_form_data ||= JSON.parse(form)
email = parsed_form_data['email']
Expand Down
4 changes: 4 additions & 0 deletions config/features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ features:
form264555:
actor_type: user
description: If enabled shows the digital form experience for form 26-4555
form_confirmation_edu_auth_user:
actor_type: user
description: Skips sending confirmation emails to authenticated users
enable_in_development: true
fsr_confirmation_email:
actor_type: user
description: Enables notifications to be sent via email upon FSR submission
Expand Down

0 comments on commit a715b39

Please sign in to comment.