Show draft/scheduled status banners for authenticated users

This commit is contained in:
Willem van den Ende
2026-04-01 21:40:17 +00:00
parent 86f7ffbe94
commit 5395b2de80
5 changed files with 90 additions and 2 deletions
@@ -22,11 +22,14 @@ defmodule FirehoseWeb.BlogController do
def show(conn, %{"slug" => slug}) do
blog = conn.assigns.blog
post = blog.get_post!(slug)
visibility = Blogex.Post.visibility(post)
render(conn, :show,
page_title: post.title,
post: post,
base_path: blog.base_path()
base_path: blog.base_path(),
visibility: visibility,
authenticated: conn.assigns[:current_user] != nil
)
end