pundit: convert bulk update requests to pundit.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<%# bur %>
|
||||
|
||||
<% if bur.approvable?(CurrentUser.user) %>
|
||||
<% if policy(bur).approve? %>
|
||||
<%= link_to "Approve", approve_bulk_update_request_path(bur), remote: true, method: :post, "data-confirm": "Are you sure you want to approve this bulk update request?" %> |
|
||||
<% end %>
|
||||
<% if bur.rejectable?(CurrentUser.user) %>
|
||||
<% if policy(bur).destroy? %>
|
||||
<%= link_to "Reject", bur, remote: true, method: :delete, "data-confirm": "Are you sure you want to reject this bulk update request?" %> |
|
||||
<% end %>
|
||||
<% if bur.editable?(CurrentUser.user) %>
|
||||
<% if policy(bur).update? %>
|
||||
<%= link_to "Edit", edit_bulk_update_request_path(bur), :"data-shortcut" => "e" %>
|
||||
<% end %>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @bulk_update_request.persisted? && CurrentUser.is_admin? %>
|
||||
<% if @bulk_update_request.persisted? && policy(@bulk_update_request).can_update_forum? %>
|
||||
<%= f.input :forum_topic_id %>
|
||||
<%= f.input :forum_post_id %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user