mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 21:43:38 +08:00
8f0544137a
Users can now edit the bookmark name and reminder time from their list of bookmarks. We use "Custom" for the date and time in the modal because if the user set a reminder for "tomorrow" then edit the reminder "tomorrow", the definition of what "tomorrow" is has changed.
16 lines
277 B
Ruby
16 lines
277 B
Ruby
# 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_create_bookmark?(bookmark)
|
|
can_see_topic?(bookmark.topic)
|
|
end
|
|
end
|