PHPackages                             codeq/advancedpublish - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. codeq/advancedpublish

ActiveNeos-package[Utility &amp; Helpers](/categories/utility)

codeq/advancedpublish
=====================

The package adds a review workflow and change logs to the Neos publication function

1.3.3(7mo ago)32.1kPHP

Since Jul 11Pushed 7mo ago2 watchersCompare

[ Source](https://github.com/code-q-web-factory/CodeQ.AdvancedPublish)[ Packagist](https://packagist.org/packages/codeq/advancedpublish)[ RSS](/packages/codeq-advancedpublish/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (14)Used By (0)

CodeQ.AdvancedPublish
=====================

[](#codeqadvancedpublish)

This package enforces a four-eyes-principle for publishing changes. For that reasons, every user gets an additional workspace, on which changes staged for publication are parked. The user then can request a review from an authorized user, who can then publish the changes to the live workspace. The reviewer can also reject the changes, whereupon the editor can revise the changes and request a new review.

Roles
-----

[](#roles)

### CodeQ.AdvancedPublish:AbstractReviewer

[](#codeqadvancedpublishabstractreviewer)

This role can be used to give users the ability to review changes. Using this role aims at not being fully able to publish changes, but to be restricted later using custom filters in the `CodeQ.AdvancedPublish.reviewers.filterImplementations` setting.

### CodeQ.AdvancedPublish:CanReview

[](#codeqadvancedpublishcanreview)

This role can be used to give users the ability to review changes with the aim to be able to publish changes across the site without any restriction.

### CodeQ.AdvancedPublish:CanReviewOwnRequests

[](#codeqadvancedpublishcanreviewownrequests)

This role can be used to give users the ability to review their own requests.

### CodeQ.AdvancedPublish:CanViewProtocol

[](#codeqadvancedpublishcanviewprotocol)

This role can be used to give users the ability to view the publication protocol.

### CodeQ.AdvancedPublish:SuperEditor

[](#codeqadvancedpublishsupereditor)

This role is allowed to see the original workspace dropdown in the Neos UI and to switch workspaces. Other users only see a simplified publish button without the option to switch workspaces.

Reviewer Filters
----------------

[](#reviewer-filters)

The package provides a flexible system to control which reviewers are allowed to publish specific content. This is implemented through reviewer filters that check if a user has the necessary permissions to publish a node.

### How Reviewer Filters Work

[](#how-reviewer-filters-work)

1. Each filter implements the `ReviewerFilterInterface` and returns a boolean value.
2. If at least one filter returns `true`, the reviewer is allowed to publish the content.
3. If all filters return `false`, the reviewer is not allowed to publish the content.

### Implementing Custom Reviewer Filters

[](#implementing-custom-reviewer-filters)

To create a custom reviewer filter:

1. Create a class that implements `CodeQ\AdvancedPublish\Domain\Service\ReviewerFilterInterface`
2. Implement the `checkFilterConditionsForUserAndNode` method that returns `true` if the user is allowed to publish the node, or `false` otherwise
3. Register your filter in the Settings.yaml configuration:

```
CodeQ:
  AdvancedPublish:
    reviewers:
      filterImplementations:
        YourFilter: 'Your\Namespace\YourFilterClass'
```

### Example Filter Implementation

[](#example-filter-implementation)

```
