diff --git a/lib/algora_web/live/org/bounties_live.ex b/lib/algora_web/live/org/bounties_live.ex
index f6a01b14..15972036 100644
--- a/lib/algora_web/live/org/bounties_live.ex
+++ b/lib/algora_web/live/org/bounties_live.ex
@@ -215,7 +215,7 @@ defmodule AlgoraWeb.Org.BountiesLive do
<% end %>
-
+
<.button
phx-click="edit-bounty-amount"
phx-value-id={bounty.id}
@@ -618,6 +618,20 @@ defmodule AlgoraWeb.Org.BountiesLive do
end)
end
+ defp can_manage_bounties?(assigns) do
+ user = assigns[:current_user]
+ org = assigns[:current_org]
+
+ if user && org do
+ case Algora.Organizations.fetch_member(org.id, user.id) do
+ {:ok, member} -> member.role in [:admin, :mod]
+ _ -> false
+ end
+ else
+ false
+ end
+ end
+
defp to_transaction_rows(transactions), do: transactions
defp assign_more_bounties(socket) do
|