Lotus.Web.Resolver behaviour (Lotus Web v0.14.5)
View SourceBehavior for customizing Lotus Web dashboard access and functionality.
Summary
Callbacks
Determine the access level for a user.
Extract the current user from a Plug.Conn when the dashboard mounts.
Types
Callbacks
@callback resolve_access(user :: user()) :: access_level()
Determine the access level for a user.
Based on the user returned from resolve_user/1, this callback determines
what operations the user can perform in the Lotus dashboard.
Return Values
:all- Full access to all Lotus features:read_only- Can only view and run queries, no modifications:forbidden- No access{:forbidden, path}- Redirect to the given path
@callback resolve_user(conn :: Plug.Conn.t()) :: user()
Extract the current user from a Plug.Conn when the dashboard mounts.
This callback is invoked when the Lotus dashboard is accessed. The returned user value will be passed to other callbacks for access control decisions.