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

Add valid_email & confirmed_at to /me-only attributes #4272

Merged
merged 6 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
4 changes: 2 additions & 2 deletions app/serializers/user_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class UserSerializer
project_email_communication beta_email_communication nasa_email_communication
uploaded_subjects_count subject_limit admin login_prompt zooniverse_id
upload_whitelist valid_email ux_testing_email_communication
intervention_notifications banned
intervention_notifications banned confirmed_at
).freeze

attributes :id, :login, :display_name, :credited_name, :email, :languages,
Expand All @@ -18,7 +18,7 @@ class UserSerializer
:subject_limit, :uploaded_subjects_count, :admin, :href, :login_prompt,
:private_profile, :zooniverse_id, :upload_whitelist, :avatar_src,
:valid_email, :ux_testing_email_communication, :intervention_notifications,
:banned
:banned, :confirmed_at
zwolf marked this conversation as resolved.
Show resolved Hide resolved

can_include :classifications, :project_preferences, :collection_preferences,
projects: { param: "owner", value: "login" },
Expand Down
4 changes: 2 additions & 2 deletions spec/factories/users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
sequence(:email) {|n| "example#{n}@example.com"}
password { 'password' }
encrypted_password { User.new.send(:password_digest, 'password') }
confirmed_at { Time.current }
confirmation_sent_at { Time.current }
confirmed_at { Time.utc(2024, 1, 1, 12, 0, 0) }
confirmation_sent_at { Time.utc(2024, 1, 1, 12, 0, 0) }
credited_name { 'Dr User' }
activated_state { :active }
sequence(:login) { |n| "new_user_#{n}" }
Expand Down