yokai-php / sonata-workflow

Integrate Symfony workflow component in Sonata Admin
MIT License
22 stars 11 forks source link

Allow transitions without 'edit' role #14

Closed will2877 closed 4 years ago

will2877 commented 4 years ago

I am working on a project where one of our partners needs to look at the Entities and confirm they are correct by forwarding them throught the workflow. I dont want to give them writing access as this would confuse them too much.

The EDIT role is statically programmed into the code. Is there any way of changing that and connecting it to the guard attributs as set in the workflow.yaml ?

yann-eugone commented 4 years ago

Hello,

No, as you said, it is hardcoded in the controller. The only thing you can do, by now, is rewriting the entire action.

Maybe the library should introduce a new permission called transition, to be called on both extension and controller, but we need to test that a lot before releasing it. As I'm not sure what Sonata will check if we do.

Le mar. 8 oct. 2019 à 16:19, DiisMami notifications@github.com a écrit :

I am working on a project where one of our partners needs to look at the Entitys and confirm they are correct by forwarding them throught the workflow. I dont want to give them writing access as this would confuse them too much.

The EDIT role is statically programmed into the code. Is there any way of changing that and connecting it to the guard attributs as set in the workflow.yaml?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/yokai-php/sonata-workflow/issues/14?email_source=notifications&email_token=AAJ6KHU44I7TLV6KSK3ZGILQNSJF5A5CNFSM4I6SMR32YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HQLR5KQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJ6KHRZ4ZT5PSVUL3Q6AUDQNSJF5ANCNFSM4I6SMR3Q .

yann-eugone commented 4 years ago

Fixed as of v0.3.0