discourse/lib/guardian/bookmark_guardian.rb
Martin Brennan 8f0544137a
FEATURE: Allow editing bookmark reminders (#9437)
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.
2020-04-17 11:08:07 +10:00

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