Closed alzearafat closed 7 years ago
Hi @riverrun
Thanks a lot for great yet simple lib :) I have an question, how I can restrict some controller/routes only for authenticated user?
Maybe something like this?
defmodule MyAwesomeApp.PageController do use Phoenix.Controller plug Openmaize.Authenticated when action != :index # ... end
Thank you in advance for any help you can provide :) Regards
You can use when not action in [:index], so the plug command would be:
when not action in [:index]
plug Openmaize.Authenticate when not action in [:index]
If you have any further questions, just let me know.
Hi @riverrun
Thanks a lot for great yet simple lib :) I have an question, how I can restrict some controller/routes only for authenticated user?
Maybe something like this?
Thank you in advance for any help you can provide :) Regards