Fix status banner auth check to use current_scope

phx.gen.auth sets current_scope, not current_user. Use !! to
ensure boolean for HEEx template and register_and_log_in_user
in tests for proper auth session.
This commit is contained in:
Willem van den Ende
2026-04-01 22:06:07 +00:00
parent 88ec475a5b
commit b6ff541b13
2 changed files with 8 additions and 16 deletions
@@ -29,7 +29,7 @@ defmodule FirehoseWeb.BlogController do
post: post,
base_path: blog.base_path(),
visibility: visibility,
authenticated: conn.assigns[:current_user] != nil
authenticated: !!(conn.assigns[:current_scope] && conn.assigns.current_scope.user)
)
end