mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 17:51:16 +08:00
FEATURE: do not allow moderators to export user list (#6418)
This commit is contained in:
@ -357,7 +357,8 @@ class Guardian
|
||||
|
||||
def can_export_entity?(entity)
|
||||
return false unless @user
|
||||
return true if is_staff?
|
||||
return true if is_admin?
|
||||
return entity != 'user_list' if is_moderator?
|
||||
|
||||
# Regular users can only export their archives
|
||||
return false unless entity == "user_archive"
|
||||
|
Reference in New Issue
Block a user