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

Check #email_address for sidebar name #3340

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

tumes
Copy link
Contributor

@tumes tumes commented Oct 15, 2024

Description

Rails 8's new baked in authentication implementation uses user#email_address by default, so I figured it would be nice to support that by default in Avo as well to make things feel seamless for the new release. This is a pretty lightweight PR but please let me know if you've like a section in the docs specific to supporting the new baked in authentication since the manual testing steps below are juuuuust fiddly enough to maybe merit their own section.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Screenshots & recording

Manual review steps

  1. Create a new app with the Rails 8 beta
  2. Add authentication with bin/rails generate authentication
  3. Create a user
  4. Install Avo
  5. Modify the Avo initializer to use Current.user for the current_user_method and session_path for the sign_out_path_name.
  6. Modify the Avo initializer to use Rails' default authentication concern with:
Rails.configuration.to_prepare do
  Avo::ApplicationController.include Authentication
end
  1. Append main_app. to any redirects in the Authentication concern.

Manual reviewer: please leave a comment with output from the test if that's the case.

Rails 8's new baked in authentication implementation uses user#email_address by default, so I figured it would be nice to support that by default in Avo as well to make things feel seamless for the new release.
Copy link

codeclimate bot commented Oct 15, 2024

Code Climate has analyzed commit 03fda2d and detected 0 issues on this pull request.

View more on Code Climate.

Copy link
Collaborator

@adrianthedev adrianthedev left a comment

Choose a reason for hiding this comment

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

I love this!
Thanks for being so proactive and sending this PR in ❤️

@adrianthedev adrianthedev merged commit bbd3c43 into avo-hq:main Oct 15, 2024
23 checks passed
@tumes tumes deleted the support-email-addresss-sidebar-name branch October 15, 2024 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants