added some comments

This commit is contained in:
Régis Hanol 2014-02-12 20:08:46 -08:00
parent 7086f01de4
commit 831ad524e6
1 changed files with 2 additions and 3 deletions

View File

@ -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