mirror of
https://github.com/discourse/discourse.git
synced 2025-09-10 12:04:21 +08:00
add a way to delete posts and topics when deleting a user with UserDestroyer
This commit is contained in:
parent
a8df9778b5
commit
e25638dab0
6 changed files with 87 additions and 49 deletions
|
@ -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?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue