Merge branch 'master' into pm-tags

This commit is contained in:
Vinoth Kannan
2018-02-21 23:55:59 +05:30
committed by GitHub
357 changed files with 5863 additions and 2023 deletions

View File

@@ -22,7 +22,9 @@ module PostGuardian
result = if authenticated? && post && !@user.anonymous?
# post made by staff, but we don't allow staff flags
return false if !SiteSetting.allow_flagging_staff? && post.user.staff?
return false if is_flag &&
(!SiteSetting.allow_flagging_staff?) &&
post.user.staff?
return false if [:notify_user, :notify_moderators].include?(action_key) &&
!SiteSetting.enable_personal_messages?

View File

@@ -72,4 +72,8 @@ module UserGuardian
user == @user || is_staff?
end
def can_disable_second_factor?(user)
user && can_administer_user?(user)
end
end