Content Moderation In Core Content Moderation In Core A - - PDF document

content moderation in core content moderation in core
SMART_READER_LITE
LIVE PREVIEW

Content Moderation In Core Content Moderation In Core A - - PDF document

4/26/2018 reveal.js Content Moderation In Core Content Moderation In Core A Presentation By A Presentation By Eric Sod Eric Sod esod esod on drupal.org on drupal.org file:///Users/sode/Documents/reveal.js/index.html#/80 1/82 4/26/2018


slide-1
SLIDE 1

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 1/82

Content Moderation In Core Content Moderation In Core

A Presentation By A Presentation By

  • n drupal.org
  • n drupal.org

Eric Sod Eric Sod esod esod

slide-2
SLIDE 2

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 2/82

Table Of Contents Table Of Contents

and and , and , , and Introduction Overview Workflow Initiative Workflows Overview Workflows Configuration Workflow States Transitions Applying the Workflow Roles Permissions Node Permissions Users Moderate Content Revisions The Future Add ons Helpful Links Questions

slide-3
SLIDE 3

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 3/82

Introduction Introduction

Senior Drupal Developer at Memorial Sloan Kettering Cancer Center (MSKCC). Work on the team that produces MSKCC's public facing web site, Eight years experience as a web developer. www.mskcc.org

slide-4
SLIDE 4

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 4/82

Memorial Sloan Kettering Memorial Sloan Kettering

Memorial Sloan Kettering Cancer Center is the world’s

  • ldest and largest

private cancer center. MSKCC has devoted more than 130 years to exceptional patient care, innovative research, and

  • utstanding

educational programs.

slide-5
SLIDE 5

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 5/82

Overview Overview

The Content Moderation module allows you to expand on Drupal's "unpublished" and "published" states for content. It allows you to have a published version that is live, but have a separate working copy that is undergoing review before it is published. This is achieved by using to apply different states to entities as needed. Workflows

slide-6
SLIDE 6

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 6/82

Workflow Initiative Workflow Initiative

slide-7
SLIDE 7

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 7/82

Content Moderation Is A Part Of The Content Moderation Is A Part Of The

Workflow Initiative Workflow Initiative

Background Background

Bring new features for actually managing content, such as workflows, preview and staging. Include functionality in core based on what contrib modules have done for many years.

Workflow Initiative ­ https://www.drupal.org/project/ideas/issues/2721129

slide-8
SLIDE 8

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 8/82

Workflow Initiative Workflow Initiative

Goals Goals

Bring major improvements to Drupal’s content workflow, preview and staging capabilities. Much of the functionality that is being implemented takes heavy inspiration from modules such as . Workbench Moderation

Workflow Initiative ­ https://www.drupal.org/project/ideas/issues/2721129

slide-9
SLIDE 9

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 9/82

Workflow Initiative Workflow Initiative

Phase C: Content Moderation Module Phase C: Content Moderation Module

This phase has introduced a module for moderating the publishing state on individual content entities. Plan issues: #2755073: WI: Content Moderation module roadmap

https://www.drupal.org/project/drupal/issues/2755073

#2843494: WI: Workflows module roadmap

https://www.drupal.org/project/drupal/issues/2843494

Workflow Initiative ­ https://www.drupal.org/project/ideas/issues/2721129

slide-10
SLIDE 10

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 10/82

Workflows Overview Workflows Overview

The Drupal 8 Workflows module allows you to manage workflow with states and transitions. is a core module that harnesses the Workflows module to allow revisionable content entities to move between different moderation states. Content Moderation

Workflows Overview ­ https://www.drupal.org/docs/8/core/modules/workflows

slide-11
SLIDE 11

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 11/82

Workflows Configuration Workflows Configuration

Enabling the module creates a default Workflow called "Editorial" that can be used for custom block types

  • r content types.

Content Moderation

slide-12
SLIDE 12

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 12/82

Configuring A Workflow Configuring A Workflow

A workflow consists of "States" and "Transitions".

slide-13
SLIDE 13

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 13/82

What is a workflow, really? What is a workflow, really?

slide-14
SLIDE 14

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 14/82

Workflow Workflow

slide-15
SLIDE 15

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 15/82

Content Moderation Workflow Content Moderation Workflow

Content Moderation Module - Out Of The Box Content Moderation Module - Out Of The Box

Image credit ­ Kim Pepper, DrupalSouth 2017

slide-16
SLIDE 16

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 16/82

Content Moderation Workflow Content Moderation Workflow

Add A Reviewer Add A Reviewer

slide-17
SLIDE 17

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 17/82

States States

slide-18
SLIDE 18

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 18/82

States States

States are the different statuses your content can have such as Draft, Published, etc.

slide-19
SLIDE 19

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 19/82

States States

Add two new states to customize our workflow: "Review" and "Request publish"

slide-20
SLIDE 20

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 20/82

States States

States can be "Published" and/or a "Default revision".

slide-21
SLIDE 21

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 21/82

States States

A state marked "Published" updates the core publishing status to published. Otherwise it is updated to unpublished. A state marked "Default revision" updates the current revision to be the default revision when loading the entity.

slide-22
SLIDE 22

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 22/82

States States

For our new states, "Published" and "Request publish" should be unchecked, since neither state is a published state.

slide-23
SLIDE 23

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 23/82

Content Moderation Workflow Content Moderation Workflow

States Have Been Added To Our Workflow States Have Been Added To Our Workflow

slide-24
SLIDE 24

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 24/82

Transitions Transitions

slide-25
SLIDE 25

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 25/82

Transitions Transitions

Transitions are the actual workflow that moves the content between states.

slide-26
SLIDE 26

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 26/82

Transitions Transitions

These are the default transitions that come configured with the Editorial workflow.

slide-27
SLIDE 27

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 27/82

Transitions Transitions

To make the new "Review" state useful, add two transitions: "Ready for review" and "Request publish". "Ready for review" will move content back and forth between the Draft and Review states.

slide-28
SLIDE 28

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 28/82

Transitions Transitions

We also need to add the "Review" state to the "Create New Draft" transition.

slide-29
SLIDE 29

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 29/82

Transitions Transitions

The "Request publish" transition will allow content under "Review" to be changed to the state 'Request publish".

slide-30
SLIDE 30

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 30/82

Transitions Transitions

To make the new "Request publish" state useful, add the "Request publish" state to the "Publish" transition to allow content under "Request publish" to be published.

slide-31
SLIDE 31

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 31/82

Content Moderation Workflow Content Moderation Workflow

Transitions Have Been Added To Our Transitions Have Been Added To Our Workflow Workflow

slide-32
SLIDE 32

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 32/82

Applying The Workflow Applying The Workflow

slide-33
SLIDE 33

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 33/82

Applying The Workflow Applying The Workflow

Arrange The Order Of States And Transitions Arrange The Order Of States And Transitions To Your Liking. To Your Liking.

slide-34
SLIDE 34

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 34/82

Applying The Workflow Applying The Workflow

The Editorial workflow has not been applied to any content types yet. So, there is no change on the create/edit node form.

slide-35
SLIDE 35

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 35/82

Applying The Workflow Applying The Workflow

On the admin page, follow these simple steps. Now, the create/edit node form looks like this ... Editorial workflow

slide-36
SLIDE 36

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 36/82

Applying The Workflow Applying The Workflow

Let's compare the before and after.

slide-37
SLIDE 37

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 37/82

Applying The Workflow Applying The Workflow

Before Before After After

slide-38
SLIDE 38

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 38/82

But Wait! But Wait!

Which roles get to create drafts, do reviews, publish content and archive (unpublish) content?

slide-39
SLIDE 39

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 39/82

Roles And Permissions Roles And Permissions

slide-40
SLIDE 40

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 40/82

Roles Roles

slide-41
SLIDE 41

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 41/82

Roles Roles

slide-42
SLIDE 42

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 42/82

Permissions Permissions

slide-43
SLIDE 43

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 43/82

Permissions For Authors Permissions For Authors

slide-44
SLIDE 44

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 44/82

Permissions For Reviewers Permissions For Reviewers

slide-45
SLIDE 45

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 45/82

Permissions For Publishers Permissions For Publishers

slide-46
SLIDE 46

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 46/82

Node Permissions Node Permissions

slide-47
SLIDE 47

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 47/82

Node Permissions Node Permissions

The Author role has permission to create and edit own Basic pages, as well as viewing and reverting revisions. The Editor role has additional permissions such as editing of any Basic page, as well as deleting. The Publisher role has additional permissions.

slide-48
SLIDE 48

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 48/82

Users Users

slide-49
SLIDE 49

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 49/82

Content Moderation Content Moderation

Users Users

slide-50
SLIDE 50

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 50/82

Now that Workflow, Content Moderation Permissions, Node Permissions and Users are configured, let's ...

Moderate Content! Moderate Content!

slide-51
SLIDE 51

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 51/82

Moderate Content! Moderate Content!

The author creates a page and saves it as a Draft.

slide-52
SLIDE 52

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 52/82

Moderate Content! Moderate Content!

The new Content Moderation entity moderation form

slide-53
SLIDE 53

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 53/82

Moderate Content! Moderate Content!

The Content Moderation entity moderation form can be altered with hook_form_FORM_ID_alter()

/** * Implements hook_form_FORM_ID_alter(). */ function MY_MODULE_form_content_moderation_entity_moderation $user = \Drupal::currentUser(); if (empty($user) || !($user->hasPermission('administer sit $form['#access'] = FALSE; } }

slide-54
SLIDE 54

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 54/82

Moderate Content! Moderate Content!

The author makes an edit and changes the state to Review.

slide-55
SLIDE 55

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 55/82

Moderate Content! Moderate Content!

The moderation state is now "Review".

slide-56
SLIDE 56

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 56/82

Moderate Content! Moderate Content!

The Reviewer takes over.

slide-57
SLIDE 57

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 57/82

Moderate Content! Moderate Content!

The Publisher takes over.

slide-58
SLIDE 58

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 58/82

Moderate Content! Moderate Content!

The content page is now published. Anyone with permission to view published content will be able to view the page.

slide-59
SLIDE 59

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 59/82

Moderate Content! Moderate Content!

The author edits the page and saves the new edit as a Draft.

slide-60
SLIDE 60

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 60/82

Moderate Content! Moderate Content!

The author can view the latest version of the content page in the new Latest version tab. The Latest version of the content page is a revision and is not publicly viewable.

slide-61
SLIDE 61

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 61/82

Moderate Content! Moderate Content!

At this time, the author, and anyone else with permission to view published content, can continue to view the published version of the content.

slide-62
SLIDE 62

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 62/82

Moderate Content! Moderate Content!

The publisher can publish the draft from the form in the latest version tab.

slide-63
SLIDE 63

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 63/82

Moderate Content! Moderate Content!

The publisher can also publish the draft in the node edit form.

slide-64
SLIDE 64

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 64/82

Moderate Content! Moderate Content!

Now the author and anyone else with permission to view published content, can view the edited content. Note the Latest version tab has, rightly, gone away.

slide-65
SLIDE 65

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 65/82

Where Does All Of This Happen? Where Does All Of This Happen?

slide-66
SLIDE 66

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 66/82

Revisions Revisions

slide-67
SLIDE 67

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 67/82

Roll Back To A Previous Revision Roll Back To A Previous Revision

slide-68
SLIDE 68

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 68/82

Revert A Revision Revert A Revision

slide-69
SLIDE 69

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 69/82

The Revision Is Now The Latest Version The Revision Is Now The Latest Version

Until it is published, reviewed, edited, and finally published.

slide-70
SLIDE 70

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 70/82

The Revision Is Published. The Revision Is Published.

slide-71
SLIDE 71

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 71/82

The Future The Future

For The Workflow Initiative For The Workflow Initiative

slide-72
SLIDE 72

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 72/82

Roadmap Roadmap

Phase E: Introduce Trash Module Phase E: Introduce Trash Module

Phase E will leverage the new workflow module and implement Trash as a new status. Plan issues: WI: Phase E: Introduce Trash module

https://www.drupal.org/project/ideas/issues/2786135

Workflow Initiative ­ https://www.drupal.org/project/ideas/issues/2721129

slide-73
SLIDE 73

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 73/82

Roadmap Roadmap

Trash Module Trash Module

WI: Phase E: Introduce Trash module ­ https://www.drupal.org/project/drupal/issues/2725449

slide-74
SLIDE 74

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 74/82

Roadmap Roadmap

Phase G: Introduce Workspace Module Phase G: Introduce Workspace Module

A workspace is a copy of the live site, that exists in parallel to the live site. Use a workspace when you want to prepare multiple new content items, that you want to go live at the same time, in a controlled manner. Plan issues: WI: Phase G1: Workspace module

https://www.drupal.org/project/drupal/issues/2755073

WI: Phase G2: Full­site preview with Workspace UI

https://www.drupal.org/project/drupal/issues/2732081

Workflow Initiative ­ https://www.drupal.org/project/ideas/issues/2721129

slide-75
SLIDE 75

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 75/82

Roadmap Roadmap

Phase H: Workspace Conflict Management Phase H: Workspace Conflict Management

This phase will extend the Workspace module to provide conflict management for content changes in separate workspaces. Plan issue: WI: Phase H: Replication and conflict management

https://www.drupal.org/project/drupal/issues/2867707

Workflow Initiative ­ https://www.drupal.org/project/ideas/issues/2721129

slide-76
SLIDE 76

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 76/82

Roadmap Roadmap

Phase X: Cross Site Content Staging Phase X: Cross Site Content Staging

This phase would implement support for cross site content staging.

Workflow Initiative ­ https://www.drupal.org/project/ideas/issues/2721129

slide-77
SLIDE 77

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 77/82

Roadmap Roadmap

Phase XI: Autosave Phase XI: Autosave

Big phase. This will be a separate module. Lots of details still to be figured out.

Workflow Initiative ­ https://www.drupal.org/project/ideas/issues/2721129

slide-78
SLIDE 78

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 78/82

Add Ons Add Ons

Contrib Modules Contrib Modules

slide-79
SLIDE 79

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 79/82

Add Ons Add Ons

The module adds to the revision tab like standard Drupal but it also allows pretty viewing of all added/changed/deleted words between revisions.

Core Core Diff Diff

diff

slide-80
SLIDE 80

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 80/82

Add Ons Add Ons

The The moderation Sidebar provides an off-canvas menu to moderate the current Entity. Moderation Sidebar

slide-81
SLIDE 81
slide-82
SLIDE 82

4/26/2018 reveal.js file:///Users/sode/Documents/reveal.js/index.html#/80 82/82

Thank You Thank You Questions? Questions?