From 97df923c7f9eb5e36d50c19a9392d2384e99454b Mon Sep 17 00:00:00 2001 From: Uku Taht Date: Thu, 7 Jan 2021 16:53:29 +0200 Subject: [PATCH] Do not allow logged out users to access crm --- lib/plausible_web/plugs/crm_auth_plug.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plausible_web/plugs/crm_auth_plug.ex b/lib/plausible_web/plugs/crm_auth_plug.ex index 7f2853998..bfffad092 100644 --- a/lib/plausible_web/plugs/crm_auth_plug.ex +++ b/lib/plausible_web/plugs/crm_auth_plug.ex @@ -9,7 +9,7 @@ defmodule PlausibleWeb.CRMAuthPlug do def call(conn, _opts) do case get_session(conn, :current_user_id) do nil -> - conn + conn |> send_resp(403, "Not allowed") |> halt id -> user = Repo.get_by(Plausible.Auth.User, id: id)