This plugin enables your team to moderate other users' new content entries for any of your content types and also users.
- Any Content types and Users: Can be activated in the administration for all content types and builtin users.
- Moderation Panel: Sort by moderation status all your content entries together.
- Permissions: Add administrators and control which role can set content pending for moderation
- Strapi v4 - (current)
npm i strapi-plugin-content-moderation
yarn add strapi-plugin-content-moderation
After successful installation, run:
npm/yarn build
npm/yarn develop
The Moderation plugin should appear in the Plugins section of Strapi sidebar after you run app again.
- Moderation must be enabled in settings of Content Type. Same as localization plugin.
- To setup plugin configuration you have to put following snippet as part of
config/plugins.js
orconfig/<env>/plugins.js
file. If the file does not exist yet, you have to create it manually. If you've got already configurations for other plugins stores by this way, use just thecontent-moderation
part within exisingplugins
item.
module.exports = ({ env }) => ({
"content-moderation": {
enabled: true,
config: {
sendNotificationEmail: true,
contentLabel: {
"*": ["Title", "title", "Name", "name", "Subject", "subject"],
},
contentListFields: {
"*": [
"Title",
"title",
"Name",
"name",
"username",
"Subject",
"subject",
"createdAt",
"updatedAt",
],
},
},
},
});
- To activate moderation of built-in Users (
users-permissions
plugin), create the extensions:src/extensions/users-permissions/content-types/user/schema.json
, copy the original content from the plugin's file and add:
"pluginOptions": {
"moderation": {
"moderated": true
}
},
sendNotificationEmail
- Enabled sending an email notification when content entries are approved or rejected to the author/user. Default value:false
.contentLabel
- List of fields that will be used to label your content in notification emails. The first field defined in your content will be used.*
is defined for all content types. You can define label fields per content types. For example:"Post": ["Title", "customField"]
contentListFields
- List of fields that will be displayed in the content list visible in the moderation panel.*
is defined for all content types. You can define label fields per content types. For example:"Post": ["Title", "customField", "createdAt"]
You can customize the email templates by overriding the files contained in server/config/email-templates
in your application.
Plugin provides granular permissions based on Strapi RBAC functionality.
For any role different than Super Admin, to access the Moderation panel you must set following permission:
- Plugins -> Content-Moderation -> Moderation: Moderate - gives you the basic read access to Moderation Panel
Feature / Capability focused permissions:
- Plugins -> Content-Moderation -> Moderation: Set Pending - allows you to set a content pending moderation
MIT License Copyright (c) Beyowi