Lotus.Web.Authentication (Lotus Web v1.2.0)

Copy Markdown View Source

on_mount hook that applies the access level of the resolver.

Lotus.Web.Router.lotus_dashboard/2 adds this hook to the live session after the host's own :on_mount hooks, so a host never lists it. The hook assigns the resolver, the user and the access level that Lotus.Web.Resolver produced at the session, and stops a :forbidden mount with a redirect.

Summary

Functions

on_mount(atom, params, session, socket)