Improve method and variable naming for clarity and consistency (#42630).

Patch by Katsuya HIDAKA (user:hidakatsuya).


git-svn-id: https://svn.redmine.org/redmine/trunk@23769 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2025-05-15 05:09:17 +00:00
parent e7703a0170
commit d2a9223c4a
4 changed files with 15 additions and 15 deletions

View File

@@ -22,13 +22,13 @@ module Redmine
# Types of objects that can have reactions
REACTABLE_TYPES = %w(Journal Issue Message News Comment)
# Returns true if the user can view the reaction information of the object
# Returns true if the user can view the reaction of the object
def self.visible?(object, user = User.current)
Setting.reactions_enabled? && object.visible?(user)
end
# Returns true if the user can add/remove a reaction to/from the object
def self.writable?(object, user = User.current)
def self.editable?(object, user = User.current)
user.logged? && visible?(object, user) && object&.project&.active?
end