1
0
mirror of https://github.com/discourse/discourse.git synced 2025-03-09 14:34:35 +00:00
discourse/lib/guardian/bookmark_guardian.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
305 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module BookmarkGuardian
def can_delete_bookmark?(bookmark)
@user == bookmark.user
end
def can_edit_bookmark?(bookmark)
@user == bookmark.user
end
def can_see_bookmarkable?(bookmark)
bookmark.registered_bookmarkable.can_see?(self, bookmark)
end
end