mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Return a 403 instead of 200 when trying to delete a user with posts
See [this commit][1] for more info
[1]: bd352a17bf
This commit is contained in:
@@ -382,7 +382,7 @@ class Admin::UsersController < Admin::AdminController
|
||||
render json: {
|
||||
deleted: false,
|
||||
message: "User #{user.username} has #{user.post_count} posts, so they can't be deleted."
|
||||
}
|
||||
}, status: 403
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user