Another spot where we need to move a Current.user check to a stimulus controller to cache

This commit is contained in:
David Heinemeier Hansson
2024-10-19 18:31:21 -07:00
parent 53afd0d93c
commit cdcf2500c1
+1
View File
@@ -7,6 +7,7 @@
<hr class="flex-item-grow margin-none" aria-hidden="true">
<%# FIXME: Move this Current.user check to a stimulus controller that just checks for admin? or the like we so we can cache user list %>
<%= button_to account_user_path(user), method: :delete, class: "btn btn--small btn--negative flex-item-no-shrink",
disabled: !Current.user.can_remove?(user),
data: { turbo_confirm: "Are you sure you want to permanently remove this person from the account?" } do %>