diff --git a/backend/app/views/spree/admin/product_properties/index.html.erb b/backend/app/views/spree/admin/product_properties/index.html.erb index fdb24c8801a..9e2f54164af 100644 --- a/backend/app/views/spree/admin/product_properties/index.html.erb +++ b/backend/app/views/spree/admin/product_properties/index.html.erb @@ -36,7 +36,7 @@ - <% if can?([:create, :update], Spree::ProductProperty) %> + <% if can?(:create, Spree::ProductProperty) && can?(:update, Spree::ProductProperty) %> <%= render 'spree/admin/shared/edit_resource_links' %> <% end %> @@ -95,7 +95,7 @@ <% end %> - <% if can?([:create, :update], Spree::VariantPropertyRule) %> + <% if can?(:create, Spree::VariantPropertyRule) && can?(:update, Spree::VariantPropertyRule) %> <%= render 'spree/admin/shared/edit_resource_links' %> <% end %> diff --git a/backend/app/views/spree/admin/users/_user_page_actions.html.erb b/backend/app/views/spree/admin/users/_user_page_actions.html.erb index e6fa075b2ac..79d42c3350e 100644 --- a/backend/app/views/spree/admin/users/_user_page_actions.html.erb +++ b/backend/app/views/spree/admin/users/_user_page_actions.html.erb @@ -1,5 +1,5 @@ <% content_for :page_actions do %> - <% if can?([:admin, :create], Spree::Order) %> + <% if can?(:admin, Spree::Order) && can?(:create, Spree::Order) %>
  • <%= link_to t(".create_order"), spree.new_admin_order_path(user_id: @user.id), class: 'btn btn-primary' %>
  • diff --git a/backend/app/views/spree/admin/users/items.html.erb b/backend/app/views/spree/admin/users/items.html.erb index 0ae3456be6a..4eab112855b 100644 --- a/backend/app/views/spree/admin/users/items.html.erb +++ b/backend/app/views/spree/admin/users/items.html.erb @@ -60,7 +60,7 @@ - <% if can?([:admin, :edit], order) %> + <% if can?(:admin, order) && can?(:edit, order) %> <%= link_to order.number, edit_admin_order_url(order) %> <% else %> <%= order.number %> diff --git a/backend/app/views/spree/admin/users/orders.html.erb b/backend/app/views/spree/admin/users/orders.html.erb index 29484ec6196..1bdc0f7d2fa 100644 --- a/backend/app/views/spree/admin/users/orders.html.erb +++ b/backend/app/views/spree/admin/users/orders.html.erb @@ -38,7 +38,7 @@ <%= l(order.completed_at.to_date) if order.completed_at %> - <% if can?([:admin, :edit], order) %> + <% if can?(:admin, order) && can?(:edit, order) %> <%= link_to order.number, edit_admin_order_path(order) %> <% else %> <%= order.number %>