From cdcf2500c17f9721a777b651b9984f67431fbb07 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 19 Oct 2024 18:31:21 -0700 Subject: [PATCH] Another spot where we need to move a Current.user check to a stimulus controller to cache --- app/views/accounts/users/_user.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/accounts/users/_user.html.erb b/app/views/accounts/users/_user.html.erb index 2a9823444..cb7855dd1 100644 --- a/app/views/accounts/users/_user.html.erb +++ b/app/views/accounts/users/_user.html.erb @@ -7,6 +7,7 @@ + <%# 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 %>