diff --git a/config/sync/og.og_role.node-solution-facilitator.yml b/config/sync/og.og_role.node-solution-facilitator.yml index 1a6f30399e60b83bfd0309cf05ab2decbb38879f..efe76a0de871611f30300b9a81a57f56cdc1b3a9 100644 --- a/config/sync/og.og_role.node-solution-facilitator.yml +++ b/config/sync/og.og_role.node-solution-facilitator.yml @@ -101,6 +101,7 @@ permissions: - 'perform node:pre_moderated workflow save_new_draft transition on any entity' - 'perform solution_workflow workflow archive transition on any entity' - 'perform solution_workflow workflow draft transition on any entity' + - 'perform solution_workflow workflow draft_after_published transition on any entity' - 'perform solution_workflow workflow propose transition on any entity' - 'perform solution_workflow workflow update_validated transition on any entity' - 'pin group content' diff --git a/config/sync/user.role.moderator.yml b/config/sync/user.role.moderator.yml index 618e8812d3f06b96e53f746fd51e975872890089..883f4b67c1639b7b47a2cd32e41642fc47901f88 100644 --- a/config/sync/user.role.moderator.yml +++ b/config/sync/user.role.moderator.yml @@ -275,6 +275,7 @@ permissions: - 'perform solution_workflow workflow archive transition on any entity' - 'perform solution_workflow workflow blacklist transition on any entity' - 'perform solution_workflow workflow draft transition on any entity' + - 'perform solution_workflow workflow draft_after_published transition on any entity' - 'perform solution_workflow workflow needs_update transition on any entity' - 'perform solution_workflow workflow propose transition on any entity' - 'perform solution_workflow workflow unarchive transition on any entity' diff --git a/tests/features/solution/solution_moderation.feature b/tests/features/solution/solution_moderation.feature index af55166b722908f08b9a4af65943b2406b9687e0..1ddf5066d3029347a6059551f0168a744567a4d9 100644 --- a/tests/features/solution/solution_moderation.feature +++ b/tests/features/solution/solution_moderation.feature @@ -49,24 +49,27 @@ Feature: Solution moderation # Facilitator of all the solutions. | William Curtis | | Given solution content: - | title | description | logo | owner | contact information | state | - | Azure Ship | Azure ship | logo.png | Angelos Agathe | Placide | draft | - | The Last Illusion | The Last Illusion | logo.png | Angelos Agathe | Placide | proposed | - | Rose of Doors | Rose of Doors | logo.png | Angelos Agathe | Placide | published | - | Fire Swords | Fire Swords | logo.png | Angelos Agathe | Placide | archived | - | The Guardian of the Stream | The Guardian of the Stream | logo.png | Angelos Agathe | Placide | needs update | - | Flames in the Swords | Flames in the Swords | logo.png | Angelos Agathe | Placide | blacklisted | + | title | description | logo | owner | contact information | state | + | Azure Ship | Azure ship | logo.png | Angelos Agathe | Placide | draft | + | The Last Illusion | The Last Illusion | logo.png | Angelos Agathe | Placide | proposed | + | Rose of Doors | Rose of Doors | logo.png | Angelos Agathe | Placide | published | + | Time Bandit | Time Bandit | logo.png | Angelos Agathe | Placide | draft_after_published | + | Fire Swords | Fire Swords | logo.png | Angelos Agathe | Placide | archived | + | The Guardian of the Stream | The Guardian of the Stream | logo.png | Angelos Agathe | Placide | needs update | + | Flames in the Swords | Flames in the Swords | logo.png | Angelos Agathe | Placide | blacklisted | And the following solution user memberships: | solution | user | roles | | Azure Ship | Franklin Walker | owner | | The Last Illusion | Franklin Walker | owner | | Rose of Doors | Franklin Walker | owner | + | Time Bandit | Franklin Walker | owner | | Fire Swords | Franklin Walker | owner | | The Guardian of the Stream | Franklin Walker | owner | | Flames in the Swords | Franklin Walker | owner | | Azure Ship | William Curtis | facilitator | | The Last Illusion | William Curtis | facilitator | | Rose of Doors | William Curtis | facilitator | + | Time Bandit | William Curtis | facilitator | | Fire Swords | William Curtis | facilitator | | The Guardian of the Stream | William Curtis | facilitator | | Flames in the Swords | William Curtis | facilitator | @@ -92,27 +95,31 @@ Feature: Solution moderation | Azure Ship | Franklin Walker | Save as draft, Propose | | The Last Illusion | Franklin Walker | Propose, Save as draft | | Rose of Doors | Franklin Walker | Publish, Save as draft, Propose, Archive | + | Time Bandit | Franklin Walker | Save as draft, Publish | | Fire Swords | Franklin Walker | | | The Guardian of the Stream | Franklin Walker | Save as draft, Propose | | Flames in the Swords | Franklin Walker | Save as draft, Propose | # The following solutions do not follow the rule above and should be - # testes as shown. + # tested as shown. | Azure Ship | William Curtis | Save as draft, Propose | | The Last Illusion | William Curtis | Propose, Save as draft | | Rose of Doors | William Curtis | Publish, Save as draft, Propose, Archive | + | Time Bandit | William Curtis | Save as draft, Publish | | Fire Swords | William Curtis | | | The Guardian of the Stream | William Curtis | Save as draft, Propose | | Flames in the Swords | William Curtis | Save as draft, Propose | | Azure Ship | Isabel Banks | | | The Last Illusion | Isabel Banks | | | Rose of Doors | Isabel Banks | | + | Time Bandit | Isabel Banks | | | Fire Swords | Isabel Banks | | | The Guardian of the Stream | Isabel Banks | | | Flames in the Swords | Isabel Banks | | | Azure Ship | Tyrone Underwood | Save as draft, Propose, Publish | | The Last Illusion | Tyrone Underwood | Propose, Save as draft, Publish, Request changes | | Rose of Doors | Tyrone Underwood | Publish, Save as draft, Propose, Request changes, Blacklist, Archive | + | Time Bandit | Tyrone Underwood | Save as draft, Publish | | Fire Swords | Tyrone Underwood | Unarchive | | The Guardian of the Stream | Tyrone Underwood | Save as draft, Propose, Publish | | Flames in the Swords | Tyrone Underwood | Save as draft, Propose, Publish | diff --git a/web/modules/custom/joinup_solution/joinup_solution.workflows.yml b/web/modules/custom/joinup_solution/joinup_solution.workflows.yml index fc55f4011be38120befca77e8a739c4f7982fa1a..01943ca48b57c919a84618eac543103454e652bb 100644 --- a/web/modules/custom/joinup_solution/joinup_solution.workflows.yml +++ b/web/modules/custom/joinup_solution/joinup_solution.workflows.yml @@ -23,6 +23,8 @@ solution_workflow: published: label: Published published: true + draft_after_published: + label: Draft needs_update: label: Needs update blacklisted: @@ -33,8 +35,14 @@ solution_workflow: transitions: draft: label: Save as draft - from: [ __new__, draft, proposed, published, needs_update, blacklisted ] + from: [ __new__, draft, proposed, needs_update, blacklisted ] to: draft + # This state is meant to allow facilitators to publish changes directly + # to a solution that has already been approved before (by a moderator). + draft_after_published: + label: Save as draft + from: [ draft_after_published, published ] + to: draft_after_published propose: label: Propose from: [ __new__, draft, proposed, published, needs_update, blacklisted ] @@ -47,7 +55,7 @@ solution_workflow: # But cannot approve proposed changes. update_validated: label: Publish - from: [ published ] + from: [ draft_after_published, published ] to: published needs_update: label: Request changes