mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57:59 +01:00
use correct permissions
This commit is contained in:
parent
007624ed85
commit
b7e07b099a
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue