mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 19:39:30 +08:00
FEATURE: allow disabling user activity tab for non admin users (#25540)
* FEATURE: allow disabling user activity tab for non admin users * add another test case
This commit is contained in:
@ -138,6 +138,7 @@ module UserGuardian
|
||||
|
||||
def can_see_user_actions?(user, action_types)
|
||||
return true if !@user.anonymous? && (@user.id == user.id || is_admin?)
|
||||
return false if SiteSetting.hide_user_activity_tab?
|
||||
(action_types & UserAction.private_types).empty?
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user