mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
Return a 403 instead of 200 when trying to delete a user with posts
See [this commit][1] for more info [1]: https://github.com/discourse/discourse/commit/bd352a17bff9019db21196d70cd9829e678a33be
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