mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-12-19 22:49:23 +08:00
List user plug before auth
We should not allow someone to list apps if they don't have a user.
This commit is contained in:
parent
9e8c6ec83e
commit
7c7d8c14cc
1 changed files with 4 additions and 2 deletions
|
|
@ -22,8 +22,10 @@ defmodule LivebookWeb.Router do
|
||||||
end
|
end
|
||||||
|
|
||||||
pipeline :auth do
|
pipeline :auth do
|
||||||
plug LivebookWeb.AuthPlug
|
# If identity provider is enabled and we don't have access
|
||||||
|
# we don't want to show Livebook's authentication
|
||||||
plug LivebookWeb.UserPlug
|
plug LivebookWeb.UserPlug
|
||||||
|
plug LivebookWeb.AuthPlug
|
||||||
end
|
end
|
||||||
|
|
||||||
pipeline :user do
|
pipeline :user do
|
||||||
|
|
@ -141,7 +143,7 @@ defmodule LivebookWeb.Router do
|
||||||
end
|
end
|
||||||
|
|
||||||
scope "/authenticate", LivebookWeb do
|
scope "/authenticate", LivebookWeb do
|
||||||
pipe_through :browser
|
pipe_through [:browser, :user]
|
||||||
|
|
||||||
get "/", AuthController, :index
|
get "/", AuthController, :index
|
||||||
post "/", AuthController, :authenticate
|
post "/", AuthController, :authenticate
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue