         end
       end
 
+      def authorize_action(conn, action) do
+        if ExAdmin.Authorization.authorize_action(conn.assigns[:defn], conn, action) do
+          conn
+        else
+          render_403(conn)
+        end
+      end
+
       defp scrub_params(conn, required_key, action) when action in [:create, :update] do
         if conn.params[required_key] do
           Phoenix.Controller.scrub_params conn, required_key

        apply(__MODULE__, action, [conn, defn, params])
      end

      defp handle_before_filter(conn, action, defn, params) do
        _handle_before_filter(conn, action, defn, params, defn.controller_filters[:before_filter])
      end

        assign(conn, :resource, resource)
      end

      defp handle_custom_actions(%{halted: true} = conn, _, _, _), do: conn
      defp handle_custom_actions({conn, params}, action, defn, _) do
        handle_custom_actions(conn, action, defn, params)
      end
