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 end
def count_duplicate_reports(user) do def count_duplicate_reports(user) do
if Canada.Can.can?(user, :manage, DuplicateReport) do if Canada.Can.can?(user, :edit, DuplicateReport) do
DuplicateReport DuplicateReport
|> where(state: "open") |> where(state: "open")
|> Repo.aggregate(:count, :id) |> Repo.aggregate(:count, :id)

View file

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

View file

@ -17,7 +17,7 @@
| Replace | Replace
a href="#" data-click-tab="administration" a href="#" data-click-tab="administration"
i.fa.fa-toolbox> i.fa.fa-toolbox>
| Administrate | Manage
= if present?(@image.scratchpad) do = if present?(@image.scratchpad) do
i.fa.fa-sticky-note.fa--important< i.fa.fa-sticky-note.fa--important<
i.fa.fa-exclamation.fa--important i.fa.fa-exclamation.fa--important