Show draft/scheduled status banners for authenticated users
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user