mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge branch 'master' into pm-tags
This commit is contained in:
@@ -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?
|
||||
|
||||
@@ -72,4 +72,8 @@ module UserGuardian
|
||||
user == @user || is_staff?
|
||||
end
|
||||
|
||||
def can_disable_second_factor?(user)
|
||||
user && can_administer_user?(user)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user