timgremore commited on
Commit
c77c303
1 Parent(s): be47c11

feat: Enable LiveDashboard in all environments

Browse files

LiveDashboard needs to be limited by user role once users are identifiable by role.

Files changed (1) hide show
  1. lib/medicode_web/router.ex +10 -2
lib/medicode_web/router.ex CHANGED
@@ -30,12 +30,12 @@ defmodule MedicodeWeb.Router do
30
  # If your application does not have an admins-only section yet,
31
  # you can use Plug.BasicAuth to set up some basic authentication
32
  # as long as you are also using SSL (which you should anyway).
33
- import Phoenix.LiveDashboard.Router
34
 
35
  scope "/dev" do
36
  pipe_through :browser
37
 
38
- live_dashboard "/dashboard", metrics: MedicodeWeb.Telemetry
39
  forward "/mailbox", Plug.Swoosh.MailboxPreview
40
  end
41
 
@@ -66,6 +66,14 @@ defmodule MedicodeWeb.Router do
66
  post "/users/log_in", UserSessionController, :create
67
  end
68
 
 
 
 
 
 
 
 
 
69
  scope "/", MedicodeWeb do
70
  pipe_through [:browser, :require_authenticated_user]
71
 
 
30
  # If your application does not have an admins-only section yet,
31
  # you can use Plug.BasicAuth to set up some basic authentication
32
  # as long as you are also using SSL (which you should anyway).
33
+ # import Phoenix.LiveDashboard.Router
34
 
35
  scope "/dev" do
36
  pipe_through :browser
37
 
38
+ # live_dashboard "/dashboard", metrics: MedicodeWeb.Telemetry
39
  forward "/mailbox", Plug.Swoosh.MailboxPreview
40
  end
41
 
 
66
  post "/users/log_in", UserSessionController, :create
67
  end
68
 
69
+ scope "/" do
70
+ pipe_through [:browser, :require_authenticated_user]
71
+
72
+ import Phoenix.LiveDashboard.Router
73
+
74
+ live_dashboard "/dashboard", metrics: MedicodeWeb.Telemetry
75
+ end
76
+
77
  scope "/", MedicodeWeb do
78
  pipe_through [:browser, :require_authenticated_user]
79