From 955a71d32addff7b54064bd23248c280dacb0d30 Mon Sep 17 00:00:00 2001 From: Adrian Gruntkowski Date: Fri, 27 Oct 2023 11:19:07 +0200 Subject: [PATCH] Add FIXME note --- lib/plausible_web/live/sites.ex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/plausible_web/live/sites.ex b/lib/plausible_web/live/sites.ex index 70485b0c5..ca889ffee 100644 --- a/lib/plausible_web/live/sites.ex +++ b/lib/plausible_web/live/sites.ex @@ -29,6 +29,8 @@ defmodule PlausibleWeb.Live.Sites do Enum.count(sites.entries) > 0 end) |> assign_new(:needs_to_upgrade, fn %{user: user, sites: sites} -> + # FIXME: this should check if user is owner of _any_ site, + # not just the first one in the list user_owns_sites = Enum.any?(sites.entries, fn site -> List.first(site.memberships ++ site.invitations).role == :owner