pundit: convert comments to pundit.

This commit is contained in:
evazion
2020-03-20 18:03:00 -05:00
parent d8e4a26906
commit a0c4617057
7 changed files with 58 additions and 45 deletions
-4
View File
@@ -117,10 +117,6 @@ class Comment < ApplicationRecord
end
end
def editable_by?(user)
updater_id == user.id || user.is_moderator?
end
def reportable_by?(user)
creator_id != user.id && !creator.is_moderator?
end