Skip to content

Commit

Permalink
Merge branch 'master' into 95897-disable-fully-validate-schema
Browse files Browse the repository at this point in the history
  • Loading branch information
coope93 committed Nov 15, 2024
2 parents 7bf174d + b150d7c commit 632c00d
Show file tree
Hide file tree
Showing 22 changed files with 1,134 additions and 1,816 deletions.
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ app/controllers/v1/decision_review_evidences_controller.rb @department-of-vetera
app/controllers/v1/decision_review_notification_callbacks_controller.rb @department-of-veterans-affairs/benefits-decision-reviews-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/controllers/v1/apidocs_controller.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/controllers/v1/notice_of_disagreements_controller.rb @department-of-veterans-affairs/benefits-decision-reviews-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/controllers/v1/pension_ipf_callbacks_controller.rb @department-of-veterans-affairs/pension-and-burials @department-of-veterans-affairs/backend-review-group
app/controllers/v1/sessions_controller.rb @department-of-veterans-affairs/octo-identity
app/controllers/v1/supplemental_claims_controller.rb @department-of-veterans-affairs/benefits-decision-reviews-be @department-of-veterans-affairs/backend-review-group
app/controllers/v1/supplemental_claims @department-of-veterans-affairs/benefits-decision-reviews-be @department-of-veterans-affairs/backend-review-group
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/be_review_prs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Require backend-review-group approval
on:
pull_request:
types: [opened, reopened, review_requested, synchronize, ready_for_review]
pull_request_review:
types: [submitted]

Expand Down
6 changes: 6 additions & 0 deletions app/controllers/v0/health_care_applications_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ class HealthCareApplicationsController < ApplicationController
before_action(only: :rating_info) { authorize(:hca_disability_rating, :access?) }

def rating_info
if Flipper.enabled?(:hca_disable_bgs_service)
# Return 0 when not calling the actual BGS::Service
render json: HCARatingInfoSerializer.new({ user_percent_of_disability: 0 })
return
end

service = BGS::Service.new(current_user)
disability_rating = service.find_rating_data[:disability_rating_record][:service_connected_combined_degree]

Expand Down
79 changes: 0 additions & 79 deletions app/controllers/v1/pension_ipf_callbacks_controller.rb

This file was deleted.

25 changes: 14 additions & 11 deletions app/controllers/v1/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ def authenticate
def user_login(saml_response)
user_session_form = UserSessionForm.new(saml_response)
raise_saml_error(user_session_form) unless user_session_form.valid?
mhv_unverified_validation(user_session_form)

mhv_unverified_validation(user_session_form.user)
create_user_verification(user_session_form.user)
@current_user, @session_object = user_session_form.persist
set_cookies
after_login_actions
Expand All @@ -158,8 +158,18 @@ def user_login(saml_response)
login_stats(:success)
end

def mhv_unverified_validation(user_session_form)
if html_escaped_relay_state['type'] == 'mhv_verified' && user_session_form.user.loa[:current] < LOA::THREE
def create_user_verification(user)
user_verifier_object = OpenStruct.new({ sign_in: user.identity.sign_in,
mhv_correlation_id: user.mhv_correlation_id,
idme_uuid: user.idme_uuid,
edipi: user.identity.edipi,
logingov_uuid: user.logingov_uuid,
icn: user.icn })
Login::UserVerifier.new(user_verifier_object).perform
end

def mhv_unverified_validation(user)
if html_escaped_relay_state['type'] == 'mhv_verified' && user.loa[:current] < LOA::THREE
mhv_unverified_error = SAML::UserAttributeError::ERRORS[:mhv_unverified_blocked]
Rails.logger.warn("SessionsController version:v1 #{mhv_unverified_error[:message]}")
raise SAML::UserAttributeError.new(message: mhv_unverified_error[:message],
Expand Down Expand Up @@ -398,13 +408,6 @@ def set_cookies
end

def after_login_actions
user_verifier_object = OpenStruct.new({ sign_in: @current_user.identity.sign_in,
mhv_correlation_id: @current_user.mhv_correlation_id,
idme_uuid: @current_user.idme_uuid,
edipi: @current_user.identity.edipi,
logingov_uuid: @current_user.logingov_uuid,
icn: @current_user.icn })
Login::UserVerifier.new(user_verifier_object).perform
Login::AfterLoginActions.new(@current_user).perform
log_persisted_session_and_warnings
end
Expand Down
20 changes: 0 additions & 20 deletions app/models/pension_ipf_notification.rb

This file was deleted.

4 changes: 2 additions & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ def needs_accepted_terms_of_use
end

def user_verification
@user_verification ||= get_user_verification
@user_verification ||= UserVerification.find_by(id: user_verification_id)
end

def user_account
@user_account ||= user_verification&.user_account
end

def user_verification_id
@user_verification_id ||= user_verification&.id
@user_verification_id ||= get_user_verification&.id
end

def user_account_uuid
Expand Down
2 changes: 1 addition & 1 deletion app/sidekiq/benefits_intake_status_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def monitor_failure(form_id, saved_claim_id, bi_uuid)
if %w[28-1900].include?(form_id)
claim = SavedClaim::VeteranReadinessEmploymentClaim.find(saved_claim_id)
if claim
claim.submit_failure_email
claim.send_failure_email
VRE::Monitor.new.log_silent_failure_avoided(context, nil, call_location:)
else
VRE::Monitor.new.log_silent_failure(context, nil, call_location:)
Expand Down
10 changes: 6 additions & 4 deletions config/features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ features:
hca_browser_monitoring_enabled:
actor_type: user
description: Enables browser monitoring for the health care application.
hca_disable_bgs_service:
actor_type: user
description: Do not call the BGS Service when this is turned on. Instead return 0 for rating.
hca_enrollment_status_override_enabled:
actor_type: user
description: Enables override of enrollment status for a user, to allow multiple submissions with same user.
Expand Down Expand Up @@ -1151,6 +1154,9 @@ features:
my_va_form_submission_statuses:
actor_type: user
description: Enables users to view the status of submitted forms.
my_va_form_submission_pdf_link:
actor_type: user
description: Enables users to view PDF link within submitted forms cards
rated_disabilities_detect_discrepancies:
actor_type: user
description:
Expand Down Expand Up @@ -1693,10 +1699,6 @@ features:
actor_type: user
description: Supplemental Claim new form updates
enable_in_development: true
pension_ipf_callbacks_endpoint:
actor_type: user
description: Pension IPF VANotify notification callbacks endpoint
enable_in_development: true
hlr_browser_monitoring_enabled:
actor_type: user
description: HLR Datadog RUM monitoring
Expand Down
1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,6 @@

scope format: false do
resources :nod_callbacks, only: [:create], controller: :decision_review_notification_callbacks
resources :pension_ipf_callbacks, only: [:create]
end
end

Expand Down
3 changes: 0 additions & 3 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1792,9 +1792,6 @@ brd:
nod_vanotify_status_callback:
bearer_token: bearer_token_secret

pension_ipf_vanotify_status_callback:
bearer_token: bearer_token_secret

travel_pay:
sts:
service_account_id: ~
Expand Down
3 changes: 0 additions & 3 deletions config/settings/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,6 @@ travel_pay:
client_number: '12345'
service_name: 'BTSSS-API'

pension_ipf_vanotify_status_callback:
bearer_token: bearer_token_secret

va_notify:
status_callback:
bearer_token: 'va_notify_bearer_token'
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class CreateFormEmailMatchesProfileLogs < ActiveRecord::Migration[7.1]
def change
create_table :form_email_matches_profile_logs do |t|
t.string :user_uuid, null: false
t.integer :in_progress_form_id, null: false
t.timestamps
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class AddIndexToFormEmailMatchesProfileLogs < ActiveRecord::Migration[7.1]
disable_ddl_transaction!

def change
add_index :form_email_matches_profile_logs,
%i[user_uuid in_progress_form_id],
unique: true,
algorithm: :concurrently,
if_not_exists: true
end
end
10 changes: 9 additions & 1 deletion db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 632c00d

Please sign in to comment.