# Preconditions for roles

The Naviga Writer is configured with Naviga ID to manage the publish flow based on three different roles.

* User
* Poweruser
* Admin

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.

![](/files/-LqfCiUER_1sn95Fwq4k)

For example maybe only an Adminuser 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.

![](/files/-LqfD4VdmpGMGMWs0QgX)

The full Publish flow then can be described in four steps for the admin role.

![](/files/-LqfCXrl-WHPzba0E8xZ)

As described in the release notes for Writer 6.0.0 ([Configuring Extended Publishing Statuses](/writer/6.1.1/release-notes/6.0.0.md#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`.

```javascript
"data": {
    "workflow": {
        "draft": {
            "pubStatus": "imext:draft",
            "title": "Draft",
            "description": "You are working on a draft for this article",
            "saveActionLabel": "Save",
            "icon": "fa-pencil",
            "color": "#828282",
            "actions": [
                {
                    "pubStatus": "imext:draft"
                }
            ],
            "transitions": [
                {
                    "nextState": "review",
                    "title": "Legal review"
                }
            ]
        },
        "review": {
            "pubStatus": "imext:review",
            "title": "Legal review",
            "description": "Article is waiting for approval",
            "saveActionLabel": "Save",
            "icon": "fa-hourglass-o",
            "color": "#ff9900",
            "actions": [
                {
                    "pubStatus": "imext:review"
                }
            ],
            "transitions": [
                {
                    "nextState": "draft",
                    "title": "Convert to draft"
                },
                {
                    "nextState": "publish",
                    "title": "Publish Now",
                    "preCondition": {
                        "hasPublishedVersion": false,
                        "permissions": [
                            "writer:group/admin",
                            "dashboard:group/admin"
                        ]
                    }
                }
            ]
        },
        "publish": {
            "pubStatus": "stat:usable",
            "title": "The article has been published",
            "description": "Changes are made to published article",
            "saveActionLabel": "Update",
            "icon": "fa-upload",
            "color": "#288dc0",
            "permissions": [
                "writer:group/admin",
                "dashboard:group/admin"
            ],
            "transitions": [
                {
                    "nextState": "draft",
                    "title": "Save new draft"
                }
            ],
            "actions": [
                {
                    "pubStart": "set",
                    "pubStop": "clear",
                    "pubStatus": "stat:usable",
                    "hasPublishedVersion": true
                }
            ]
        }
    }
}
```

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.

```javascript
{
    "nextState": "publish",
    "title": "Publish Now",
    "preCondition": {
        "hasPublishedVersion": false,
        "permissions": [
            "writer:group/admin",
            "dashboard:group/admin"
        ]
    }
}
```

"imext:review" is a custom publishing status which is supported with the release of EditorService `5.0.0`.

```javascript
...
"review": {
    "pubStatus": "imext:review"
...
```

The custom publishing statuses are further described in the [Default configuration definitions](/writer/6.1.1/admin-guide/publish-flow/default-configuration-example.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.navigaglobal.com/writer/6.1.1/admin-guide/publish-flow/preconditions-for-roles.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
