symfony-workflows

Symfony Workflow Component and Security Voters?

大兔子大兔子 提交于 2019-12-25 08:04:17
问题 TL;DR: how can you add custom constraints (i.e. security voters) to transitions? My application needs some workflow management system, so I'd like to try Symfony's new Workflow Component. Let's take a Pull Request workflow as an example. In this example, only states and their transitions are describes. But what if I want to add other constraints to this workflow? I can image some constraints: Only admins can accept Pull Request Users can only reopen their own Pull Request Users can not reopen