Unverified Commit 517619e9 authored by larowlan's avatar larowlan

Issue #2899306 by Neograph734: Group content moderation permissions per workflow type

parent b9d6ef39
...@@ -26,9 +26,9 @@ public function transitionPermissions() { ...@@ -26,9 +26,9 @@ public function transitionPermissions() {
foreach (Workflow::loadMultipleByType('content_moderation') as $id => $workflow) { foreach (Workflow::loadMultipleByType('content_moderation') as $id => $workflow) {
foreach ($workflow->getTypePlugin()->getTransitions() as $transition) { foreach ($workflow->getTypePlugin()->getTransitions() as $transition) {
$permissions['use ' . $workflow->id() . ' transition ' . $transition->id()] = [ $permissions['use ' . $workflow->id() . ' transition ' . $transition->id()] = [
'title' => $this->t('Use %transition transition from %workflow workflow.', [ 'title' => $this->t('%workflow workflow: Use %transition transition.', [
'%transition' => $transition->label(),
'%workflow' => $workflow->label(), '%workflow' => $workflow->label(),
'%transition' => $transition->label(),
]), ]),
]; ];
} }
......
...@@ -58,10 +58,10 @@ public function permissionsTestCases() { ...@@ -58,10 +58,10 @@ public function permissionsTestCases() {
], ],
[ [
'use simple_workflow transition publish' => [ 'use simple_workflow transition publish' => [
'title' => 'Use <em class="placeholder">Publish</em> transition from <em class="placeholder">Simple Workflow</em> workflow.', 'title' => '<em class="placeholder">Simple Workflow</em> workflow: Use <em class="placeholder">Publish</em> transition.',
], ],
'use simple_workflow transition create_new_draft' => [ 'use simple_workflow transition create_new_draft' => [
'title' => 'Use <em class="placeholder">Create New Draft</em> transition from <em class="placeholder">Simple Workflow</em> workflow.', 'title' => '<em class="placeholder">Simple Workflow</em> workflow: Use <em class="placeholder">Create New Draft</em> transition.',
], ],
], ],
], ],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment