mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Gracefully handle unhandled reviewables (#31118)
Plugins like for example AI or Akismet create reviewable items. When the plugin is disabled, then we cannot properly handle those items. In that situation, we should display warnings about unhandled types. Instruct admin to reenable plugins. In addition, we should allow the admin to delete all pending reviews from disabled plugins.
This commit is contained in:
committed by
GitHub
parent
f439bf14cc
commit
5eb7d6d9c0
8
app/controllers/admin/unknown_reviewables_controller.rb
Normal file
8
app/controllers/admin/unknown_reviewables_controller.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Admin::UnknownReviewablesController < Admin::AdminController
|
||||
def destroy
|
||||
Reviewable.destroy_unknown_types!
|
||||
render json: success_json
|
||||
end
|
||||
end
|
||||
@@ -74,6 +74,7 @@ class ReviewablesController < ApplicationController
|
||||
total_rows_reviewables: total_rows,
|
||||
types: meta_types,
|
||||
reviewable_types: Reviewable.types,
|
||||
unknown_reviewable_types: Reviewable.unknown_types,
|
||||
score_types:
|
||||
ReviewableScore
|
||||
.types
|
||||
|
||||
Reference in New Issue
Block a user