Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
225
Merge Requests
225
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
517619e9
Unverified
Commit
517619e9
authored
Aug 24, 2017
by
larowlan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2899306
by Neograph734: Group content moderation permissions per workflow type
parent
b9d6ef39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
core/modules/content_moderation/src/Permissions.php
core/modules/content_moderation/src/Permissions.php
+2
-2
core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php
...ion/tests/src/Kernel/ContentModerationPermissionsTest.php
+2
-2
No files found.
core/modules/content_moderation/src/Permissions.php
View file @
517619e9
...
@@ -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
(),
]),
]),
];
];
}
}
...
...
core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php
View file @
517619e9
...
@@ -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
.'
,
],
],
],
],
],
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment