Skip to content

Commit

Permalink
Merge pull request #3843 from nebulab/spaghetticode/permission-fix
Browse files Browse the repository at this point in the history
Check for edit permission when showing store credit edit link
  • Loading branch information
kennyadsl authored Nov 17, 2020
2 parents 3e49459 + 682e939 commit 8679eea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/app/views/spree/admin/store_credits/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<span><%= t store_credit.invalidated? ? 'spree.say_yes' : 'spree.say_no' %></span>
</td>
<td class="actions" data-hook="admin_store_credits_index_row_actions">
<% if can?(:show, store_credit) %>
<% if can?(:edit, store_credit) %>
<%= link_to_edit_url admin_user_store_credit_path(@user, store_credit), { no_text: true, class: 'edit' } %>
<% end %>
</td>
Expand Down

0 comments on commit 8679eea

Please sign in to comment.