filter editing

This commit is contained in:
byte[] 2019-11-30 21:25:42 -05:00
parent 2df262a1de
commit dae9f90501

View file

@ -56,6 +56,9 @@ defimpl Canada.Can, for: [Atom, Philomena.Users.User] do
def can?(_user, :show, %Filter{system: true}), do: true
def can?(%User{id: id}, :show, %Filter{user_id: id}), do: true
# Edit filters they own
def can?(%User{id: id}, action, %Filter{user_id: id}) when action in [:edit, :update], do: true
# View non-deleted images
def can?(_user, action, Image)
when action in [:new, :create, :index],