pundit: convert post flags to pundit.

This commit is contained in:
evazion
2020-03-19 21:47:43 -05:00
parent ffae64f127
commit 33d81d0d1b
11 changed files with 136 additions and 119 deletions

View File

@@ -48,7 +48,7 @@ class PostEvent
true
when PostFlag
flag = event
user.can_view_flagger_on_post?(flag)
Pundit.policy!([user, nil], flag).can_view_flagger?
end
end