Fixed incorrect showing of favorite groups

This commit is contained in:
BrokenEagle
2017-12-18 12:16:20 -08:00
parent 26c168bdcd
commit 3b1fdc8cde
3 changed files with 26 additions and 5 deletions

View File

@@ -237,4 +237,8 @@ class FavoriteGroup < ApplicationRecord
def editable_by?(user)
creator_id == user.id
end
def viewable_by?(user)
creator_id == user.id || !creator.hide_favorites?
end
end