fix: Session diagnostic
This commit is contained in:
parent
8a506d54fa
commit
2e8b6bf1b6
1 changed files with 2 additions and 0 deletions
|
@ -14,6 +14,8 @@ defmodule Legendary.AuthWeb.Plugs.RequireAdmin do
|
||||||
IO.puts "XXXXXX"
|
IO.puts "XXXXXX"
|
||||||
IO.inspect( Pow.Plug.current_user(conn))
|
IO.inspect( Pow.Plug.current_user(conn))
|
||||||
IO.puts "XXXXXX"
|
IO.puts "XXXXXX"
|
||||||
|
IO.inspect(conn |> Plug.Conn.fetch_session() |> Plug.Conn.get_session()
|
||||||
|
IO.puts "XXXXXX"
|
||||||
with user = %User{} <- Pow.Plug.current_user(conn),
|
with user = %User{} <- Pow.Plug.current_user(conn),
|
||||||
true <- Roles.has_role?(user, "admin")
|
true <- Roles.has_role?(user, "admin")
|
||||||
do
|
do
|
||||||
|
|
Loading…
Reference in a new issue