From b4fbec1f6654591356950b6781e0b30f11f33c3a Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Thu, 19 Dec 2019 20:33:24 -0500 Subject: [PATCH] more stringent on user indexing --- lib/philomena_web/controllers/admin/user_controller.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/philomena_web/controllers/admin/user_controller.ex b/lib/philomena_web/controllers/admin/user_controller.ex index bdf6921c..d59f4128 100644 --- a/lib/philomena_web/controllers/admin/user_controller.ex +++ b/lib/philomena_web/controllers/admin/user_controller.ex @@ -8,7 +8,7 @@ defmodule PhilomenaWeb.Admin.UserController do import Ecto.Query plug :verify_authorized - plug :load_resource, model: User, only: [:edit, :update], id_field: "slug", preload: [:roles] + plug :load_and_authorize_resource, model: User, only: [:edit, :update], id_field: "slug", preload: [:roles] plug :load_roles when action in [:edit] def index(conn, %{"q" => q}) do