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

User changes - contactable opt-in #703

Merged
merged 2 commits into from
Jan 16, 2025
Merged

User changes - contactable opt-in #703

merged 2 commits into from
Jan 16, 2025

Conversation

andrew-1234
Copy link
Contributor

User changes - contactable opt-in

The purpose is to implement a consent status for whether a user can be contacted or not via email (#692)

Changes

  • updates user model, new field contactable, enum type

  • adds generic consent enum + contactable implementation

  • contactable added to strong params + self.filter_settings

  • user can now :update, in ability.rb

  • test cases added on user model + requests

unrelated updates to error handling in lib/gems/baw-app/lib/types.rb

autoformat only changes:

  • spec/factories/user_factory.rb
  • spec/controllers/user_accounts_controller_spec.rb

Problems

None identified

Visual Changes

None

updates related functionality (filter, strong params) for updated user model
adds test cases to users model and users requests

updates error handling in lib/gems/baw-app/lib/types.rb

autoformat **only** changes:
spec/factories/user_factory.rb
spec/controllers/user_accounts_controller_spec.rb
app/models/ability.rb Show resolved Hide resolved
app/models/user.rb Outdated Show resolved Hide resolved
Copy link
Member

@atruskie atruskie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done on your first PR 🥳. Minor changes suggested.

app/models/user.rb Show resolved Hide resolved
db/migrate/20250113012304_add_contactable_to_users.rb Outdated Show resolved Hide resolved
db/migrate/20250113012304_add_contactable_to_users.rb Outdated Show resolved Hide resolved
spec/models/user_spec.rb Outdated Show resolved Hide resolved
spec/requests/users_spec.rb Show resolved Hide resolved
changes values of consent enum
@andrew-1234 andrew-1234 requested a review from atruskie January 16, 2025 05:43
@atruskie atruskie merged commit 6c0435e into master Jan 16, 2025
2 of 4 checks passed
@atruskie atruskie deleted the user-model-contactable branch January 16, 2025 12:43
@atruskie atruskie restored the user-model-contactable branch January 16, 2025 12:43
atruskie added a commit that referenced this pull request Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants