Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VI-1104] removes id_me_user_uuid method #21158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions app/models/in_progress_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ def cast(value)

validates(:form_data, presence: true)
validates(:user_uuid, presence: true)
validate(:id_me_user_uuid)

# https://guides.rubyonrails.org/active_record_callbacks.html
before_save :serialize_form_data
Expand Down Expand Up @@ -114,16 +113,6 @@ def log_hca_email_diff
HCA::LogEmailDiffJob.perform_async(id, real_user_uuid) if form_id == '1010ez'
end

# Some IDs we get from ID.me are 20, 21, 22 or 23 char hex strings
# > we started off with just 22 random hex chars (from openssl random bytes) years
# > ago, and switched to UUID v4 (minus dashes) later on
# https://dsva.slack.com/archives/C1A7KLZ9B/p1501856503336861
def id_me_user_uuid
if user_uuid && !user_uuid.length.in?([20, 21, 22, 23, 32])
errors.add(:user_uuid, "(#{user_uuid}) is not a proper length")
end
end

def serialize_form_data
self.form_data = form_data.to_json unless form_data.is_a?(String)
end
Expand Down
Loading