mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-01 03:46:44 +01:00
more permissions
This commit is contained in:
parent
993658ce0e
commit
7a1cc312f3
1 changed files with 5 additions and 0 deletions
|
@ -64,6 +64,11 @@ defimpl Canada.Can, for: [Atom, Philomena.Users.User] do
|
|||
|
||||
# Reveal anon users
|
||||
def can?(%User{role: "moderator"}, :reveal_anon, _object), do: true
|
||||
def can?(%User{role: "moderator"}, :show, :ip_address), do: true
|
||||
|
||||
# Edit posts and comments
|
||||
def can?(%User{role: "moderator"}, :edit, %Post{}), do: true
|
||||
def can?(%User{role: "moderator"}, :edit, %Comment{}), do: true
|
||||
|
||||
# Show the DNP list
|
||||
def can?(%User{role: "moderator"}, :index, DnpEntry), do: true
|
||||
|
|
Loading…
Reference in a new issue