The admin, mounted with chime_admin/2 (imported with Chime.Router):
a person's notifications and their log, the events, the deliveries
that failed and a way to send them again.
scope "/admin" do
pipe_through [:browser, :require_admin]
chime_admin "/notifications",
access: MyAppWeb.ChimeAdminAccess,
on_mount: [{MyAppWeb.AdminAuth, :require_admin}]
end:access is a module of Chime.Admin.Access, asked on the request of
the page: Chime fails closed, and the admin is a 404 to anyone it does
not allow. Mount it behind the app's admin pipeline and its on_mount
all the same.
Summary
Functions
Mounts Chime.Router.Admin at path in a host router.
Functions
Mounts Chime.Router.Admin at path in a host router.
import Chime.Router.Admin
scope "/" do
pipe_through :browser
chime_admin "/chime"
endOptions
:access(atom/0) - Required. The app'sChime.Admin.Access: who may see the admin.:otp_app(atom/0) - The app whose notifiers the previews show: its modules ofChime.Notifierwithpreview/0. Without it, the notifiers loaded.
Every mount also takes the options listed in PhoenixMountable, such as
:as, :on_mount and :csp_nonce_assign_key.