Conversation
There was a problem hiding this comment.
Started to encounter some weird issues with installing mysql gem in this repo. Not sure if this is required anymore?
| # Configure the e-mail address which will be shown in Devise::Mailer, | ||
| # note that it will be overwritten if you use your own mailer class | ||
| # with default "from" parameter. | ||
| config.mailer_sender = "[email protected]" |
There was a problem hiding this comment.
This will need to be updated to something real (I added a note in the PR description for needing to setup emails in production)
| # frozen_string_literal: true | ||
|
|
||
| Rails.application.routes.draw do | ||
| root controller: "comfy/cms/content", cms_path: "", action: "show" |
There was a problem hiding this comment.
This is for making root_url and helpers work in comfy mexican sofa. Devise will often use root_url for various things.
|
|
||
| require "test_helper" | ||
|
|
||
| class AdminTest < ActiveSupport::TestCase |
There was a problem hiding this comment.
Not a bad idea to add some tests here and maybe some higher level tests to test the Sign up flows/etc.
We will have to address the failing tests as well in this PR as I have switch away from Basic Auth to Devise and will need to update the failing tests to use the devise sign in test helpers.
This is the first of a few PRs to help replace the basic authentication we have for CMS Admin (more info here #551)
In this PR we added specifically:
Here is a quick overview of what this gave us:
When you first go to
http://localhost:3000/adminto view the Admin area of the CMS you will get booted to the login screen:You can login via the user we created in the seeds, on this form use the email: "[email protected]" and password: "password" and hit the login button.
You will now be redirected to the Admin CMS dashboard:

That's it. This replaces the Basic auth flow, and we now have personalized Admin accounts in the database which people can log into the Admin CMS.
Some improvements could be:
Fix broken tests, switch from my basic auth helper to devise test helper and update testsFuture work: