mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-15 17:34:41 +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
d40c004e83
commit
7799494db2
1 changed files with 4 additions and 2 deletions
|
@ -22,8 +22,10 @@ defmodule LivebookWeb.Router do
|
|||
end
|
||||
|
||||
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.AuthPlug
|
||||
end
|
||||
|
||||
pipeline :user do
|
||||
|
@ -141,7 +143,7 @@ defmodule LivebookWeb.Router do
|
|||
end
|
||||
|
||||
scope "/authenticate", LivebookWeb do
|
||||
pipe_through :browser
|
||||
pipe_through [:browser, :user]
|
||||
|
||||
get "/", AuthController, :index
|
||||
post "/", AuthController, :authenticate
|
||||
|
|
Loading…
Add table
Reference in a new issue