use correct permissions

This commit is contained in:
Luna D 2019-12-08 17:03:26 -05:00
parent 007624ed85
commit b7e07b099a
No known key found for this signature in database
GPG key ID: D0F46C94720BAA4B
2 changed files with 2 additions and 2 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)