mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 21:43:45 +08:00
5db41cd578
Co-authored-by: Martin Brennan <martin@discourse.org> Co-authored-by: Sam Saffron <sam.saffron@gmail.com>
12 lines
208 B
Ruby
12 lines
208 B
Ruby
# frozen_string_literal: true
|
|
|
|
module BookmarkGuardian
|
|
def can_delete_bookmark?(bookmark)
|
|
@user == bookmark.user
|
|
end
|
|
|
|
def can_create_bookmark?(bookmark)
|
|
can_see_topic?(bookmark.topic)
|
|
end
|
|
end
|