added some comments
This commit is contained in:
parent
7086f01de4
commit
831ad524e6
|
@ -177,14 +177,13 @@ class Guardian
|
|||
|
||||
def can_send_private_message?(target)
|
||||
(User === target || Group === target) &&
|
||||
# User is authenticated
|
||||
authenticated? &&
|
||||
|
||||
# Can't send message to yourself
|
||||
is_not_me?(target) &&
|
||||
|
||||
# Have to be a basic level at least
|
||||
@user.has_trust_level?(:basic) &&
|
||||
|
||||
# PMs are enabled
|
||||
SiteSetting.enable_private_messages
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue