Implement global permissions for customer actions and update views to check permissions before rendering buttons

This commit is contained in:
ricky committed 2026-09-08 22:35:52 -04:00
1 parent fd91bd6fa2
commit bab019a152
5 files changed
+17 -7

No files matched your search

+3 -1
View File
@@ -14,7 +14,9 @@
<%= call_hook :customer_actions_bottom, { customer: @customer } %>
<%= button_to t(:label_edit_customer), edit_customer_path(@customer), method: :get%>
<% if User.current.allowed_to?(:edit_customers, nil, global: true) %>
<%= button_to t(:label_edit_customer), edit_customer_path(@customer), method: :get%>
<% end %>
<script>
function handleSingleSelect(event, className) {