mirror of
https://github.com/redmine/redmine.git
synced 2025-10-26 07:46:17 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user