Phoenix Contexts Message passing for actors and humans

Phoenix 1.4 Chat Server: Part 4

Phoenix 1.4 Chat Server, Part 4.

This episode covers building an Auth Plug. It will let us restrict any action in any controller to only logged-in users or to only admins. We also set up a special function plug for the user controller for restricting actions to the correct user. E.g. users can edit their own accounts but not each others.