Add revoke all blocks link
This commit is contained in:
parent
f73b7205f4
commit
8682b58154
6 changed files with 55 additions and 1 deletions
|
@ -61,7 +61,7 @@ class Ability
|
|||
can [:index, :show, :resolve, :ignore, :reopen], Issue
|
||||
can :create, IssueComment
|
||||
can [:new, :create, :edit, :update, :destroy], Redaction
|
||||
can [:new, :edit, :create, :update, :revoke], UserBlock
|
||||
can [:new, :edit, :create, :update, :revoke, :revoke_all], UserBlock
|
||||
end
|
||||
|
||||
if user.administrator?
|
||||
|
|
|
@ -101,6 +101,12 @@
|
|||
</li>
|
||||
<% end %>
|
||||
|
||||
<% if can?(:revoke_all, UserBlock) and @user.blocks.active.exists? %>
|
||||
<li>
|
||||
<%= link_to t(".revoke_all_blocks"), revoke_all_user_blocks_path(@user) %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<% if can?(:create, UserBlock) %>
|
||||
<li>
|
||||
<%= link_to t(".create_block"), new_user_block_path(@user) %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue