I’ve just merged in the Review Queue that has been in development for the last few months. We’ve been running it on our servers for a while and it’s passed through the hands of several developers so it’s in a good place to start testing with those Discourse users who follow the
Here are the notes from the commit:
This is a large refactor that merges all types of reviewable items in core Discourse (Users, Queued Posts and Flags) into one consolidated review queue.
- One convenient place to review all content
- Reviewable items are scored behind the scenes and the highest priority items are shown first. Staff members and higher trust level users produce higher priority items.
- You can filter the review queue by status, priority, reviewable type, category and user
- The API for reviewables returns the list of actions that can be performed on an item, which means the front end application can be simpler and not duplicate all the logic.
- Data structures are built to enable non-staff level moderation of items in the near future
Software Design Notes
Reviewable model uses single table inheritance (STI), and each type of reviewable must declare a subclass, serializer and ember component. Three types currently exist:
ReviewableFlaggedPost. Developers are encouraged to look at how other reviewable items are implemented and build their own.
Post Actions (such as flags) must now be created using the
PostActionCreator service object. It has a much friendlier API now and returns a result object which will return the associated reviewable.
REST API is maintained with the old endpoints, however deprecation warnings are logged. Third party code that is pointed at the old APIs should be updated to the new review queue API. All of the Ember.js/front end code for the old user approval / flagging interface / queued posts is removed.
In a future release we will remove the old APIs and backwards compatibility.
Please use this topic for feedback and bug reports. I’ll try to address things as quickly as possible!