Created
January 28, 2016 16:48
-
-
Save imetallica/a5db353e9336ab31d310 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defp set_tokens(conn, user_from_db) do | |
| case user_from_db.account_level do | |
| 99 -> # Admin level | |
| Guardian.Plug.sign_in(conn, user_from_db, perms: %{admin: [:all]}) | |
| redirect(conn, to: page_path(conn, :index)) | |
| _ -> # Not yet implemented | |
| redirect(conn, to: page_path(conn, :index)) | |
| end | |
| end | |
| # Error | |
| ## unable to encode value: {:perms, %{admin: [:all]}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment