Merge remote-tracking branch 'origin/staff-tools'

This commit is contained in:
byte[] 2019-12-08 21:40:10 -05:00
commit 92dd6e1edb
3 changed files with 4 additions and 4 deletions

View file

@ -116,7 +116,7 @@ defmodule Philomena.DuplicateReports do
end
def count_duplicate_reports(user) do
if Canada.Can.can?(user, :manage, DuplicateReport) do
if Canada.Can.can?(user, :edit, DuplicateReport) do
DuplicateReport
|> where(state: "open")
|> Repo.aggregate(:count, :id)

View file

@ -118,7 +118,7 @@ defmodule Philomena.Reports do
end
def count_reports(user) do
if Canada.Can.can?(user, :manage, Report) do
if Canada.Can.can?(user, :index, Report) do
Report
|> where(open: true)
|> Repo.aggregate(:count, :id)

View file

@ -17,7 +17,7 @@
| Replace
a href="#" data-click-tab="administration"
i.fa.fa-toolbox>
| Administrate
| Manage
= if present?(@image.scratchpad) do
i.fa.fa-sticky-note.fa--important<
i.fa.fa-exclamation.fa--important
@ -89,4 +89,4 @@
= submit "Delete", class: "button button--state-danger button--separate-left"
- else
= button_to "Restore", Routes.image_delete_path(@conn, :delete, @image), method: "delete", class: "button button--state-success"
= button_to "Restore", Routes.image_delete_path(@conn, :delete, @image), method: "delete", class: "button button--state-success"