Preconditions for roles in the publish flow
Preconditions by different roles in Naviga ID
The Naviga Writer is configured with Naviga ID so that the publish flow can be managed with the following roles.
Role
Config
writer:admin
writer:group/admin
writer:approver
writer:group/approver
writer.author
writer:group/author
writer:contributor
writer:group/contributor
writer:editor
writer:group/editor
writer:external
writer:group/external
writer:powerUser
writer:group/powerUser
writer:readOnly
writer:access
writer:group/readOnly
writer:user
writer:group/user
That means that you can have different roles that can have permissions to do certain parts in the publish flow. In the Writer view it can look like this with an approval workflow.
For example maybe only an Approver or Editor should be able to Approve and from the approved-state be able to Publish and that is then set up as Permission in Preconditions for the nextState. See the config example below.
The full Publish flow then can be described in four steps.
As described in the release notes for Writer 6.0.0 (Configuring Extended Publishing Statuses) an example from the config code looks like this:
The plugin configuration for a draft->review->publish workflow where only administrators are allowed to go from approal state: Review to publish. The administrators are only an example, you can set any of the above roles suitable for your workflow.
1
"data": {
2
"workflow": {
3
"draft": {
4
"pubStatus": "imext:draft",
5
"title": "Draft",
6
"description": "You are working on a draft for this article",
7
"saveActionLabel": "Save",
8
"icon": "fa-pencil",
9
"color": "#828282",
10
"actions": [
11
{
12
"pubStatus": "imext:draft"
13
}
14
],
15
"transitions": [
16
{
17
"nextState": "review",
18
"title": "Legal review"
19
}
20
]
21
},
22
"review": {
23
"pubStatus": "imext:review",
24
"title": "Legal review",
25
"description": "Article is waiting for approval",
26
"saveActionLabel": "Save",
27
"icon": "fa-hourglass-o",
28
"color": "#ff9900",
29
"actions": [
30
{
31
"pubStatus": "imext:review"
32
}
33
],
34
"transitions": [
35
{
36
"nextState": "draft",
37
"title": "Convert to draft"
38
},
39
{
40
"nextState": "publish",
41
"title": "Publish Now",
42
"preCondition": {
43
"hasPublishedVersion": false,
44
"permissions": [
45
"writer:group/admin" // here is the role that specifies the permission to enter next state, that is Publish
46
]
47
}
48
}
49
]
50
},
51
"publish": {
52
"pubStatus": "stat:usable",
53
"title": "The article has been published",
54
"description": "Changes are made to published article",
55
"saveActionLabel": "Update",
56
"icon": "fa-upload",
57
"color": "#288dc0",
58
"permissions": [
59
"writer:group/admin" // here is the role that specifies the permission to publish.
60
],
61
"transitions": [
62
{
63
"nextState": "draft",
64
"title": "Save new draft"
65
}
66
],
67
"actions": [
68
{
69
"pubStart": "set",
70
"pubStop": "clear",
71
"pubStatus": "stat:usable",
72
"hasPublishedVersion": true
73
}
74
]
75
}
76
}
77
}
Copied!
The config above describes that a user can save to the review status, but not go from the review status to publish. The preCondition.permissions in the block below shows that only users in the admin groups are allowed to publish an article.
1
{
2
"nextState": "publish",
3
"title": "Publish Now",
4
"preCondition": {
5
"hasPublishedVersion": false,
6
"permissions": [
7
"writer:group/admin" // here is the role that specifies the permission to enter next state, that is Publish
8
]
9
}
10
}
Copied!
"imext:review" is a custom publishing status which is supported with the release of EditorService 5.0.0.
1
...
2
"review": {
3
"pubStatus": "imext:review"
4
...
Copied!
The custom publishing statuses are further described in the Default configuration definitions.
Copy link