Portfolio: Authorized Blog Page
Mix.install([
{:kino, github: "livebook-dev/kino", override: true},
{:kino_lab, "~> 0.1.0-dev", github: "jonatanklosko/kino_lab"},
{:vega_lite, "~> 0.1.4"},
{:kino_vega_lite, "~> 0.1.1"},
{:benchee, "~> 0.1"},
{:ecto, "~> 3.7"},
{:math, "~> 0.7.0"},
{:faker, "~> 0.17.0"},
{:utils, path: "#{__DIR__}/../utils"},
{:tested_cell, git: "https://github.com/BrooklinJazz/tested_cell"}
])
Navigation
Authorized Blog Page
You’re going to add authorization to your blog.
All users should be able to view all blogs, however only authorized users should be able to create, edit, and update their own blogs.
Authorization Requirements
Ensure you:
-
Allow all clients to access the
:index
and:show
actions for blogs. -
Allow only authenticated users to access the
:new
,:create
,:edit
,:update
, and:delete
actions for their own blogs. -
(BONUS) Add a
:user_name
field to each user. Each username should be unique.
Remember to use the mix phx.gen.auth
command to generate the initial authentication system.
Commit Your Progress
Run the following in your command line from the project folder to track and save your progress in a Git commit.
$ git add .
$ git commit -m "finish portfolio auth blog page exercise"