DEV: Adapt to core bookmark changes (#280)
* Added can_see_bookmarkable? methods to BaseBookmarkable, implement that in QueryGroupBookmarkable * Update spec to check that Notification for reminder has bookmarkable_id and bookmarkable_type c.f. https://github.com/discourse/discourse/pull/25905
This commit is contained in:
@@ -55,8 +55,12 @@ module ::DiscourseDataExplorer
|
||||
end
|
||||
|
||||
def self.can_see?(guardian, bookmark)
|
||||
return false if !bookmark.bookmarkable.group
|
||||
guardian.user_is_a_member_of_group?(bookmark.bookmarkable.group)
|
||||
can_see_bookmarkable?(guardian, bookmark.bookmarkable)
|
||||
end
|
||||
|
||||
def self.can_see_bookmarkable?(guardian, bookmarkable)
|
||||
return false if !bookmarkable.group
|
||||
guardian.user_is_a_member_of_group?(bookmarkable.group)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user