mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:17:36 +08:00
add a way to delete posts and topics when deleting a user with UserDestroyer
This commit is contained in:
@ -150,8 +150,8 @@ class Guardian
|
||||
user && is_staff?
|
||||
end
|
||||
|
||||
def can_delete_user?(user_to_delete)
|
||||
can_administer?(user_to_delete) && user_to_delete.post_count <= 0
|
||||
def can_delete_user?(user)
|
||||
can_administer?(user)
|
||||
end
|
||||
|
||||
# Can we see who acted on a post in a particular way?
|
||||
|
Reference in New Issue
Block a user